Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Done tokens need parentheses to return the correct value. #29

Open
wants to merge 1 commit into from

1 participant

gak10100
gak10100

The bitwise operator needs parentheses in order to return the proper value. Without it it will always return 0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jun 7, 2012
  1. gak10100

    The bitwise operator needs parentheses in order to return the proper …

    gak10100 authored
    …value. Without it it will always return 0.
This page is out of date. Refresh to see the latest.
Showing with 6 additions and 6 deletions.
  1. +6 −6 src/done.token.coffee
12 src/done.token.coffee
View
@@ -20,18 +20,18 @@ class exports.DoneToken extends Token
@name = 'DONE'
@handlerFunction = 'done'
@__defineGetter__ 'hasMore', =>
- @status & 0x01 isnt 0
+ (@status & 0x01) isnt 0
@__defineGetter__ 'isError', =>
- @status & 0x02 isnt 0
+ (@status & 0x02) isnt 0
@__defineGetter__ 'hasRowCount', =>
- @status & 0x10 isnt 0
+ (@status & 0x10) isnt 0
# meh, spell it both ways, why not
@__defineGetter__ 'isCanceled', =>
- @status & 0x20 isnt 0
+ (@status & 0x20) isnt 0
@__defineGetter__ 'isCancelled', =>
- @status & 0x20 isnt 0
+ (@status & 0x20) isnt 0
@__defineGetter__ 'isFatal', =>
- @status & 0x100 isnt 0
+ (@status & 0x100) isnt 0
fromBuffer: (stream, context) ->
@status = stream.readUInt16LE()
Something went wrong with that request. Please try again.