From 61e8c12bb509d947873ee2d1df0c42aa0c1ef6ca Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Tue, 9 Apr 2002 05:18:11 +0000 Subject: Irssi::timeout_add() - don't allow smaller values than 10 git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2658 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/perl/common/Core.xs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/perl/common') 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 -- cgit v1.2.3