From: Jon Trulson Date: Tue, 14 Aug 2012 00:18:52 +0000 (-0600) Subject: Revert "At least on OpenBSD/amd64, this macro returns a bogus value if its argument... X-Git-Tag: 2.2.0b~82^2~15 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=3b06b6a6b7269c7f1d3bf249ef0b177bb5dbf3e3;p=oweals%2Fcde.git Revert "At least on OpenBSD/amd64, this macro returns a bogus value if its argument is NULL." This reverts commit 0d2f7866ac676ab0f3c8ac3eabcec06f580a9d62. This causes great mayhem in building/generating dtbuilder .msg files (corrupting them, and inserting '(nil)' all over the place). These would cause dtbuilder, and any other program built by dtcodegen to have screwed up colors, missing callbacks and other mayhem. This was confirmed by others on the list - reverting this made those issues go away. It may be that the int -> long is correct, but the NULL check certainly does not seem to do what was intended. I'll leave it up to Pascal to investigate :) --- diff --git a/cde/programs/dtappbuilder/src/libAButil/istr.h b/cde/programs/dtappbuilder/src/libAButil/istr.h index 35828148..fead77a6 100644 --- a/cde/programs/dtappbuilder/src/libAButil/istr.h +++ b/cde/programs/dtappbuilder/src/libAButil/istr.h @@ -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) \ - ((istring)==NULL ? Istr_null_string : (istrP_int_array1809065681PrivD[((long)istring)].str)) + (istrP_int_array1809065681PrivD[((int)istring)].str) /* istr_string - if debugging is turned on, checks ISTRINGS for validity */ #ifdef DEBUG