note about undocumented caller() return value (from M.J.T. Guy);
[p5sagit/p5-mst-13.2.git] / toke.c
diff --git a/toke.c b/toke.c
index 49a1193..6af744c 100644 (file)
--- a/toke.c
+++ b/toke.c
@@ -896,7 +896,7 @@ S_tokeq(pTHX_ SV *sv)
        goto finish;
 
     s = SvPV_force(sv, len);
-    if (SvIVX(sv) == -1)
+    if (SvTYPE(sv) >= SVt_PVIV && SvIVX(sv) == -1)
        goto finish;
     send = s + len;
     while (s < send && *s != '\\')