Fixed coverity issue 1047647
This commit is contained in:
parent
ac3fb4c676
commit
96285eec58
@ -241,6 +241,9 @@ LPSTR CharLowerA(LPSTR lpsz)
|
|||||||
int i;
|
int i;
|
||||||
int length;
|
int length;
|
||||||
|
|
||||||
|
if (!lpsz)
|
||||||
|
return (LPSTR) NULL;
|
||||||
|
|
||||||
length = strlen(lpsz);
|
length = strlen(lpsz);
|
||||||
|
|
||||||
if (length < 1)
|
if (length < 1)
|
||||||
@ -248,15 +251,14 @@ LPSTR CharLowerA(LPSTR lpsz)
|
|||||||
|
|
||||||
if (length == 1)
|
if (length == 1)
|
||||||
{
|
{
|
||||||
LPSTR pc = NULL;
|
|
||||||
char c = *lpsz;
|
char c = *lpsz;
|
||||||
|
|
||||||
if ((c >= 'A') && (c <= 'Z'))
|
if ((c >= 'A') && (c <= 'Z'))
|
||||||
c = c + 32;
|
c = c + 32;
|
||||||
|
|
||||||
*pc = c;
|
*lpsz = c;
|
||||||
|
|
||||||
return pc;
|
return lpsz;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < length; i++)
|
for (i = 0; i < length; i++)
|
||||||
|
Loading…
Reference in New Issue
Block a user