Fix potential crash in path manipulation on windows

This commit is contained in:
Kristján Valur Jónsson 2007-04-13 22:20:13 +00:00
parent 2f2f57916c
commit 019fcbc2e8
1 changed files with 1 additions and 1 deletions

View File

@ -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);