mirror of https://github.com/raysan5/raylib
Update utils.c
This commit is contained in:
parent
d9a30b8480
commit
ed29b4eedf
|
@ -299,7 +299,7 @@ bool ExportDataAsCode(const char *data, unsigned int size, const char *fileName)
|
|||
for (int i = 0; varFileName[i] != '\0'; i++) if ((varFileName[i] >= 'a') && (varFileName[i] <= 'z')) { varFileName[i] = varFileName[i] - 32; }
|
||||
|
||||
byteCount += sprintf(txtData + byteCount, "static unsigned char %s_DATA[%i] = { ", varFileName, size);
|
||||
for (int i = 0; i < dataSize - 1; i++) byteCount += sprintf(txtData + byteCount, ((i%TEXT_BYTES_PER_LINE == 0)? "0x%x,\n" : "0x%x, "), data[i]);
|
||||
for (int i = 0; i < size - 1; i++) byteCount += sprintf(txtData + byteCount, ((i%TEXT_BYTES_PER_LINE == 0)? "0x%x,\n" : "0x%x, "), data[i]);
|
||||
byteCount += sprintf(txtData + byteCount, "0x%x };\n", data[size - 1]);
|
||||
|
||||
// NOTE: Text data size exported is determined by '\0' (NULL) character
|
||||
|
|
Loading…
Reference in New Issue