This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
More defensive definition of memEQs().
authorNicholas Clark <nick@ccl4.org>
Sun, 25 Apr 2010 08:35:11 +0000 (09:35 +0100)
committerNicholas Clark <nick@ccl4.org>
Sun, 25 Apr 2010 08:35:11 +0000 (09:35 +0100)
handy.h

diff --git a/handy.h b/handy.h
index 1ff7fde..b40deba 100644 (file)
--- a/handy.h
+++ b/handy.h
@@ -404,7 +404,7 @@ C<strncmp>).
 #endif
 
 #define memEQs(s1, l, s2) \
-       (sizeof(s2)-1 == l && memEQ(s1, (s2 ""), (sizeof(s2)-1)))
+       (sizeof(s2)-1 == l && memEQ(s1, ("" s2 ""), (sizeof(s2)-1)))
 #define memNEs(s1, l, s2) !memEQs(s1, l, s2)
 
 /*