mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-28 01:50:48 +00:00
Correct pointer comparisons relying on NULL less than any other pointer.
Alexander Aganichev's fix for ieee.c
This commit is contained in:
@@ -219,7 +219,7 @@ make_tempname (filename)
|
||||
{
|
||||
/* We could have foo/bar\\baz, or foo\\bar, or d:bar. */
|
||||
char *bslash = strrchr (filename, '\\');
|
||||
if (bslash > slash)
|
||||
if (slash == NULL || (bslash != NULL && bslash > slash))
|
||||
slash = bslash;
|
||||
if (slash == NULL && filename[0] != '\0' && filename[1] == ':')
|
||||
slash = filename + 1;
|
||||
|
||||
Reference in New Issue
Block a user