Fix buffer_getchar to only error if we'd exceed the buffer size
authorJonathan McDowell <noodles@earth.li>
Mon, 25 Apr 2011 01:33:13 +0000 (18:33 -0700)
committerJonathan McDowell <noodles@earth.li>
Mon, 25 Apr 2011 01:33:13 +0000 (18:33 -0700)
commitf93d57195dfa072ca6fea0c76428fde5337bcabc
treeef646fd37255f9f89ef84e6343bf4142826db51f
parent7f5cb141f9e9112773f4437987ce15666370873f
Fix buffer_getchar to only error if we'd exceed the buffer size

  We were erroring when we retrieved the end of the buffer, and not
  if we overflowed past the end. Check if we'd overflow and return
  an error only in that case.
charfuncs.c