| 149 | |
| 150 | |
| 151 | void String_Append(cc_string* str, char c) { |
| 152 | /* MSVC in debug mode will initialise all variables on the stack with 0xCC by default */ |
| 153 | /* So if a string is being passed with CC in all its fields, then it's probably invalid */ |
| 154 | #if _MSC_VER && _DEBUG |
| 155 | if (str->length == 0xCCCC && str->capacity == 0xCCCC) |
| 156 | Process_Abort("String must be initialised before calling String_Append"); |
| 157 | #endif |
| 158 | |
| 159 | if (str->length == str->capacity) return; |
| 160 | str->buffer[str->length++] = c; |
| 161 | } |
| 162 | |
| 163 | void String_AppendBool(cc_string* str, cc_bool value) { |
| 164 | String_AppendConst(str, value ? "True" : "False"); |
no outgoing calls
no test coverage detected