mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-12 21:29:00 +08:00
Fix comparison bw integer and pointer (#4155)
* Fix comparison bw integer and pointer Error: ISO C++ forbids comparison between pointer and integer [-fpermissive] * Check for nullptr input string.
This commit is contained in:
parent
2675e697ef
commit
b3bd918f29
@ -99,9 +99,11 @@ namespace nowide {
|
||||
///
|
||||
inline int putenv(char *string)
|
||||
{
|
||||
if (string == nullptr) return -1;
|
||||
char const *key = string;
|
||||
char const *key_end = string;
|
||||
while(*key_end!='=' && key_end!='\0')
|
||||
|
||||
while(*key_end!='=' && *key_end!='\0')
|
||||
key_end++;
|
||||
if(*key_end == '\0')
|
||||
return -1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user