Correct pointer comparisons relying on NULL less than any other pointer.

Alexander Aganichev's fix for ieee.c
This commit is contained in:
Alan Modra
2000-06-20 12:33:21 +00:00
parent b305ef96a1
commit 2ab47eed68
10 changed files with 42 additions and 14 deletions

View File

@ -575,7 +575,7 @@ set_scripts_dir ()
{
/* We could have \foo\bar, or /foo\bar. */
char *bslash = strrchr (program_name, '\\');
if (bslash > end)
if (end == NULL || (bslash != NULL && bslash > end))
end = bslash;
}
#endif