Patch parse_params() to deal with BSD strtol() #129

Closed
wants to merge 1 commit into
from

Projects

None yet

3 participants

@peterjeremy
Contributor

strtol(3) can optionally set errno to EINVAL if no conversion could be
performed and FreeBSD (at least) implements thin behaviour. Add an
explicit test to detect this situation in Dispatcher::parse_params().
(This behaviour difference is not relevant to other uses of strtol()).

This corrects the mishandling of (eg) "CSI m" on FreeBSD.

@peterjeremy peterjeremy strtol(3) can optionally set errno to EINVAL if no conversion could be
performed and FreeBSD (at least) implements thin behaviour.  Add an
explicit test to detect this situation in Dispatcher::parse_params().
(This behaviour difference is not relevant to other uses of strtol()).

This corrects the mishandling of (eg) "CSI m" on FreeBSD.
37c86a9
@peterjeremy
Contributor

This should be linked to #126 but I have no idea how to make github do that.

@keithw
Member
keithw commented Apr 11, 2012

Thanks for this -- we will merge it.

@wez
wez commented on 37c86a9 Apr 11, 2012

This fixes the weird color bleed I experienced this morning with vim on OSX, and also fixes my regular text color in zsh

wez replied Apr 11, 2012

See also: mobile-shell#110

@keithw keithw added a commit that closed this pull request Apr 11, 2012
@peterjeremy @keithw peterjeremy + keithw strtol(3) can optionally set errno to EINVAL if no conversion could be
performed and FreeBSD (at least) implements thin behaviour.  Add an
explicit test to detect this situation in Dispatcher::parse_params().
(This behaviour difference is not relevant to other uses of strtol()).

This corrects the mishandling of (eg) "CSI m" on FreeBSD.

Closes #129 github pull request.
[keithw -- also fixes same issue with mosh-server on OS X]
fd0ddf0
@keithw keithw closed this in fd0ddf0 Apr 11, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment