GetStringInList Returns a pointer to the string in a string list ( \0 \0...). Be VERY careful that the index you pass in is a valid string index index = Index of string you want list = string list (a bunch of strings, seperated by \0) maxsize = size of string list buffer returns NULL on error (if an error can be detected)
| 2551 | // maxsize = size of string list buffer |
| 2552 | // returns NULL on error (if an error can be detected) |
| 2553 | char *GetStringInList(int index, char *list, int maxsize) { |
| 2554 | int count = 0; |
| 2555 | int p = 0; |
| 2556 | char *pp; |
| 2557 | pp = list; |
| 2558 | |
| 2559 | while (1) { |
| 2560 | if (count == index) |
| 2561 | return pp; |
| 2562 | |
| 2563 | if (p < maxsize) { |
| 2564 | if (*pp == '\0') |
| 2565 | count++; |
| 2566 | } else |
| 2567 | return NULL; |
| 2568 | p++; |
| 2569 | pp++; |
| 2570 | } |
| 2571 | return NULL; |
| 2572 | } |
| 2573 | |
| 2574 | // UpdateAudioTauntBoxes |
| 2575 | // |
no outgoing calls
no test coverage detected