diff options
author | Nicholas Clark <nick@ccl4.org> | 2005-05-27 18:54:36 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2005-05-27 18:54:36 +0000 |
commit | 60b9f5a768d813874b27945f3490540726428049 (patch) | |
tree | 85f17c90ad13aee9c281f32991583e9821ed0fd5 /perl.h | |
parent | 59e20782fa64e3099e5ed0b949ffe8b1d6c1b162 (diff) | |
download | perl-60b9f5a768d813874b27945f3490540726428049.tar.gz |
In assert(), we mustn't stringify the message as part of the first
argument to croak, as it's a *printf format, and the thing we're
asserting might itself contain % signs.
Also, as __FILE__ is a string, we can append that to the format,
rather than needing a %s for it.
p4raw-id: //depot/perl@24609
Diffstat (limited to 'perl.h')
-rw-r--r-- | perl.h | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -3191,8 +3191,8 @@ Gid_t getegid (void); #ifndef assert /* <assert.h> might have been included somehow */ #define assert(what) PERL_DEB( \ ((what) ? ((void) 0) : \ - (Perl_croak(aTHX_ "Assertion " STRINGIFY(what) " failed: file \"%s\", line %d", \ - __FILE__, __LINE__), \ + (Perl_croak(aTHX_ "Assertion %s failed: file \"" __FILE__ \ + "\", line %d", STRINGIFY(what), __LINE__), \ PerlProc_exit(1), \ (void) 0))) #endif |