irssi-import / bugs.irssi.org

bugs.irssi.org archive
https://github.com/irssi/irssi/issues
0 stars 0 forks source link

24 days timestamp limit without proper error message #821

Open irssibot opened 12 years ago

irssibot commented 12 years ago

/set scrollback_time 31days 15:07 -!- Irssi: Invalid timestamp

I had to read the code for understanding the why it failed, in src/core/misc.c:

<-- snip -->

... int parse_time_interval(const char time, int msecs) { ... if (g_ascii_strncasecmp(desc, "days", len) == 0) { if (number > 24) { / would overflow / return FALSE; } ...

<-- snip -->

Please change the implementations to something that allows more than 24 days (e.g. by returning seconds instead of milliseconds, or by by using a 64bit integer), or output at least a useful error message.