1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-02-13 11:42:21 +00:00

At least on OpenBSD/amd64, this macro returns a bogus value if its argument is NULL.

Patch from Pascal Stumpf <Pascal.Stumpf@cubes.de>

So check for this first like the other macros in this file do, and
don't cast an istring to int.
This commit is contained in:
Jon Trulson 2012-08-09 12:21:43 -06:00
parent 491ff2228f
commit 0d2f7866ac

View file

@ -272,7 +272,7 @@ extern ISTR_PRIVT_STRN *istrP_int_array1809065681PrivD;
#define istr_string_safe(s) ((s) == NULL? Istr_null_string:istr_string(s))
#define istrP_get_string_fast3718930164PrivF(istring) \
(istrP_int_array1809065681PrivD[((int)istring)].str)
((istring)==NULL ? Istr_null_string : (istrP_int_array1809065681PrivD[((long)istring)].str))
/* istr_string - if debugging is turned on, checks ISTRINGS for validity */
#ifdef DEBUG