From 3b06b6a6b7269c7f1d3bf249ef0b177bb5dbf3e3 Mon Sep 17 00:00:00 2001 From: Jon Trulson Date: Mon, 13 Aug 2012 18:18:52 -0600 Subject: [PATCH] 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 :) --- cde/programs/dtappbuilder/src/libAButil/istr.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cde/programs/dtappbuilder/src/libAButil/istr.h b/cde/programs/dtappbuilder/src/libAButil/istr.h index 358281484..fead77a60 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