summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/perl/common/Core.xs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/perl/common/Core.xs b/src/perl/common/Core.xs
index 4db742c0..20cf32f1 100644
--- a/src/perl/common/Core.xs
+++ b/src/perl/common/Core.xs
@@ -136,7 +136,12 @@ timeout_add(msecs, func, data)
SV *func
SV *data
CODE:
- RETVAL = perl_timeout_add(msecs, func, data);
+ if (msecs < 10) {
+ croak("Irssi::timeout() : msecs must be >= 10");
+ RETVAL = -1;
+ } else {
+ RETVAL = perl_timeout_add(msecs, func, data);
+ }
OUTPUT:
RETVAL