Skip to content
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

nil string will unpack into empty string #14

Closed
khchen opened this issue Nov 25, 2017 · 1 comment
Closed

nil string will unpack into empty string #14

khchen opened this issue Nov 25, 2017 · 1 comment

Comments

@khchen
Copy link

khchen commented Nov 25, 2017

proc unpack_type*(s: Stream, val: var string) =
  let pos = s.getPosition()
  if s.readChar == pack_value_nil:
    val = "" # should be nil here?
    return
@jangko
Copy link
Owner

jangko commented Nov 26, 2017

should be nil here?

yes, the spec says, nil output should be nil, it is a bug.

@jangko jangko closed this as completed in 8464546 Nov 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants