| 109 | } |
| 110 | |
| 111 | wchar_t * CopyFormatCharacter(wchar_t * szBuffer, const wchar_t *& szFormat) |
| 112 | { |
| 113 | static const wchar_t * szStringFormat = L"%s"; |
| 114 | static const wchar_t * szUint64Format = fmt_I64u_t; |
| 115 | |
| 116 | // String format |
| 117 | if(szFormat[0] == '%') |
| 118 | { |
| 119 | if(szFormat[1] == 's') |
| 120 | { |
| 121 | wcscpy(szBuffer, szStringFormat); |
| 122 | szFormat += 2; |
| 123 | return szBuffer + wcslen(szStringFormat); |
| 124 | } |
| 125 | |
| 126 | // Replace %I64u with the proper platform-dependent suffix |
| 127 | if(szFormat[1] == 'I' && szFormat[2] == '6' && szFormat[3] == '4' && szFormat[4] == 'u') |
| 128 | { |
| 129 | wcscpy(szBuffer, szUint64Format); |
| 130 | szFormat += 5; |
| 131 | return szBuffer + wcslen(szUint64Format); |
| 132 | } |
| 133 | } |
| 134 | |
| 135 | // Copy the character as-is |
| 136 | *szBuffer++ = *szFormat++; |
| 137 | return szBuffer; |
| 138 | } |
| 139 | |
| 140 | char * CopyFormatCharacter(char * szBuffer, const char *& szFormat) |
| 141 | { |
nothing calls this directly
no test coverage detected