Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

ensure that `bool` is an unsigned type

  • Loading branch information...
commit 2045666a8169c4fc0a7f8ae81aa9e3dbda31b166 1 parent 3ffa961
@TooTallNate authored
Showing with 4 additions and 1 deletion.
  1. +4 −1 lib/ref.js
View
5 lib/ref.js
@@ -487,7 +487,10 @@ exports.types.Utf8String = {
// "typedef"s for the variable-sized types
;[ 'bool', 'byte', 'char', 'uchar', 'short', 'ushort', 'int', 'uint', 'long'
, 'ulong', 'longlong', 'ulonglong', 'size_t' ].forEach(function (name) {
- var unsigned = name === 'byte' || name === 'size_t' || name[0] === 'u'
+ var unsigned = name === 'bool'
+ || name === 'byte'
+ || name === 'size_t'
+ || name[0] === 'u'
var size = exports.sizeof[name]
assert(size >= 1 && size <= 8)
var typeName = 'int' + (size * 8)
Please sign in to comment.
Something went wrong with that request. Please try again.