Fix potential crash in path manipulation on windows

parent 2f2f5791
......@@ -650,7 +650,7 @@ calculate_path(void)
start of the path in question - even if this
is one character before the start of the buffer
*/
while (*look != DELIM && look >= module_search_path)
while (look >= module_search_path && *look != DELIM)
look--;
nchars = lookEnd-look;
strncpy(lookBuf, look+1, nchars);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment