diff options
author | Timo Sirainen <cras@irssi.org> | 2002-04-09 05:18:11 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2002-04-09 05:18:11 +0000 |
commit | 61e8c12bb509d947873ee2d1df0c42aa0c1ef6ca (patch) | |
tree | 8888db7e075b1ca58314b37d54cecfe024d9ffb9 | |
parent | aa5934ade31ca9581988187281be9630ac5ffdc2 (diff) | |
download | irssi-61e8c12bb509d947873ee2d1df0c42aa0c1ef6ca.zip |
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
-rw-r--r-- | src/perl/common/Core.xs | 7 |
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 |