summaryrefslogtreecommitdiff
path: root/perl.h
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2005-05-27 18:54:36 +0000
committerNicholas Clark <nick@ccl4.org>2005-05-27 18:54:36 +0000
commit60b9f5a768d813874b27945f3490540726428049 (patch)
tree85f17c90ad13aee9c281f32991583e9821ed0fd5 /perl.h
parent59e20782fa64e3099e5ed0b949ffe8b1d6c1b162 (diff)
downloadperl-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.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/perl.h b/perl.h
index 9aaf7b4d36..7688d9602c 100644
--- a/perl.h
+++ b/perl.h
@@ -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