Skip to content

Commit faca406

Browse files
committed
Fix off-by-one in physfs
This change was integrated into physfs upstream as baecd71ae0e7
1 parent faaba72 commit faca406

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

misc/libphysfs/platform_unix.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ static char *findBinaryInPath(const char *bin, char *envr)
193193

194194
if (access(exe, X_OK) == 0) /* Exists as executable? We're done. */
195195
{
196-
exe[size - binlen] = '\0'; /* chop off filename, leave '/' */
196+
exe[size - binlen - 1] = '\0'; /* chop off filename, leave '/' */
197197
return exe;
198198
} /* if */
199199

0 commit comments

Comments
 (0)