We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bc5c0d6 commit 0244b05Copy full SHA for 0244b05
tools/xsrc.c
@@ -168,11 +168,14 @@ static int XSearch_GetSize(char *pSize, size_t *pMaxRead)
168
169
while (*pSize && isdigit(*pSize)) pSize++;
170
while (*pSize && isspace(*pSize)) pSize++;
171
- xstrcase(pSize, XSTR_LOWER);
172
173
- if (*pSize == 'k') nSize = nSize * 1024;
174
- else if (*pSize == 'm') nSize = nSize * 1024 * 1024;
175
- else if (*pSize == 'g') nSize = nSize * 1024 * 1024 * 1024;
+ if (*pSize)
+ {
+ char cSize = (char)tolower(*pSize);
+ if (cSize == 'k') nSize = nSize * 1024;
176
+ else if (cSize == 'm') nSize = nSize * 1024 * 1024;
177
+ else if (cSize == 'g') nSize = nSize * 1024 * 1024 * 1024;
178
+ }
179
180
*pMaxRead = nSize;
181
return XSTDOK;
0 commit comments