Skip to content

Commit 019fcbc

Browse files
author
Kristján Valur Jónsson
committed
Fix potential crash in path manipulation on windows
1 parent 2f2f579 commit 019fcbc

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

PC/getpathp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -650,7 +650,7 @@ calculate_path(void)
650650
start of the path in question - even if this
651651
is one character before the start of the buffer
652652
*/
653-
while (*look != DELIM && look >= module_search_path)
653+
while (look >= module_search_path && *look != DELIM)
654654
look--;
655655
nchars = lookEnd-look;
656656
strncpy(lookBuf, look+1, nchars);

0 commit comments

Comments
 (0)