Because MSVC++'s version is too stupid to check for NULL... Passing NULL to strlen will definitely cause a crash.
| 92 | // Because MSVC++'s version is too stupid to check for NULL... |
| 93 | // Passing NULL to strlen will definitely cause a crash. |
| 94 | ILuint ilCharStrLen(const char *Str) |
| 95 | { |
| 96 | const char *eos = Str; |
| 97 | |
| 98 | if (Str == NULL) |
| 99 | return 0; |
| 100 | |
| 101 | while (*eos++); |
| 102 | |
| 103 | return((int)(eos - Str - 1)); |
| 104 | } |
| 105 | |
| 106 | |
| 107 | // Simple function to test if a filename has a given extension, disregarding case |
no outgoing calls
no test coverage detected