mirror of
https://github.com/DaveGamble/cJSON.git
synced 2025-01-13 18:57:57 +08:00
MSVC: Fix warning about assignment in condition
This commit is contained in:
parent
d1c2e2df4a
commit
ac368e9dfb
3
cJSON.c
3
cJSON.c
@ -147,7 +147,8 @@ static unsigned char* cJSON_strdup(const unsigned char* string, const internal_h
|
||||
}
|
||||
|
||||
length = strlen((const char*)string) + sizeof("");
|
||||
if (!(copy = (unsigned char*)hooks->allocate(length)))
|
||||
copy = (unsigned char*)hooks->allocate(length);
|
||||
if (copy == NULL)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user