summaryrefslogtreecommitdiff
path: root/re.c
diff options
context:
space:
mode:
Diffstat (limited to 're.c')
-rw-r--r--re.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/re.c b/re.c
index e487e55869..b0b53c1de4 100644
--- a/re.c
+++ b/re.c
@@ -95,7 +95,7 @@ rb_memsearch_ss(const unsigned char *xs, long m, const unsigned char *ys, long n
{
const unsigned char *y;
- if (y = memmem(ys, n, xs, m))
+ if ((y = memmem(ys, n, xs, m)) != NULL)
return y - ys;
else
return -1;