Fixed bug in checking of last char of environment variable
This commit is contained in:
parent
214302fc11
commit
13bb1c1117
@ -18,8 +18,8 @@ getenv(const char *name)
|
||||
return (char *)NULL;
|
||||
while ((p = *v++) != NULL) {
|
||||
q = name;
|
||||
while (*q && (*q++ == *p++))
|
||||
/* EMPTY */ ;
|
||||
while (*q && (*q == *p++))
|
||||
q++;
|
||||
if (*q || (*p != '='))
|
||||
continue;
|
||||
return (char *)p + 1;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user