New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

parse_time_interval: Allow negative time in settings #722

Merged
merged 1 commit into from Jun 23, 2017

Conversation

Projects
None yet
2 participants
@dequis
Member

dequis commented Jun 17, 2017

This splits sign parsing out of parse_time_interval_uint() so that the
negative sign is applied outside of the unsigned context where the
number parsing is done, and after all the checks that it's lower than
(1 << 31)

This fixes issues with settings like server_reconnect_time,
server_connect_timeout and lag_max_before_disconnect, which accepted
-1 as a valid value.


Fixes #716

parse_time_interval: Allow negative time in settings
This splits sign parsing out of parse_time_interval_uint() so that the
negative sign is applied outside of the unsigned context where the
number parsing is done, and after all the checks that it's lower than
(1 << 31)

This fixes issues with settings like `server_reconnect_time`,
`server_connect_timeout` and `lag_max_before_disconnect`, which accepted
-1 as a valid value.

@ailin-nemui ailin-nemui merged commit 2b20934 into irssi:master Jun 23, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

ailin-nemui added a commit to ailin-nemui/irssi that referenced this pull request Dec 7, 2017

Merge pull request irssi#722 from dequis/back-to-the-future
parse_time_interval: Allow negative time in settings

(cherry picked from commit 2b20934)

@ailin-nemui ailin-nemui added this to the 1.0.4 milestone Jan 10, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment