Comparing version 1.2.0 to 1.2.1
@@ -384,10 +384,7 @@ // Generated by CoffeeScript 1.7.1 | ||
writeParameterData: function(buffer, parameter) { | ||
var val; | ||
if (parameter.value != null) { | ||
val = typeof parameter.value !== 'number' ? parameter.value : parseInt(parameter.value); | ||
buffer.writeUInt8(8); | ||
if (parseInt(parameter.value) > 0x100000000) { | ||
buffer.writeUInt32LE(parseInt(parameter.value) % 0x100000000); | ||
} else { | ||
buffer.writeInt32LE(parseInt(parameter.value) % 0x100000000); | ||
} | ||
return buffer.writeInt32LE(Math.floor(parseInt(parameter.value) / 0x100000000)); | ||
return buffer.writeInt64LE(val); | ||
} else { | ||
@@ -394,0 +391,0 @@ return buffer.writeUInt8(0); |
// Generated by CoffeeScript 1.7.1 | ||
var convertLEBytesToString, getNextRemainder, invert, isZero; | ||
var convertLEBytesToString, getNextRemainder, invert, isZero, numberToInt64LE; | ||
@@ -66,2 +66,26 @@ isZero = function(array) { | ||
numberToInt64LE = function(num) { | ||
var buf, carry, hi, i, lo, negate, v, _i, _j; | ||
negate = num < 0; | ||
hi = Math.abs(num); | ||
lo = hi % 0x100000000; | ||
hi = (hi / 0x100000000) | 0; | ||
buf = new Buffer(8); | ||
for (i = _i = 0; _i <= 7; i = ++_i) { | ||
buf[i] = lo & 0xff; | ||
lo = i === 3 ? hi : lo >>> 8; | ||
} | ||
if (negate) { | ||
carry = 1; | ||
for (i = _j = 0; _j <= 7; i = ++_j) { | ||
v = (buf[i] ^ 0xff) + carry; | ||
buf[i] = v & 0xff; | ||
carry = v >> 8; | ||
} | ||
} | ||
return buf; | ||
}; | ||
module.exports.convertLEBytesToString = convertLEBytesToString; | ||
module.exports.numberToInt64LE = numberToInt64LE; |
// Generated by CoffeeScript 1.7.1 | ||
var SHIFT_LEFT_32, SHIFT_RIGHT_32, WritableTrackingBuffer, buffertools; | ||
var SHIFT_LEFT_32, SHIFT_RIGHT_32, WritableTrackingBuffer, bigint, buffertools; | ||
bigint = require('./bigint'); | ||
buffertools = require('../buffertools'); | ||
@@ -112,2 +114,10 @@ | ||
WritableTrackingBuffer.prototype.writeInt64LE = function(value) { | ||
var buf; | ||
buf = bigint.numberToInt64LE(value); | ||
console.log(value); | ||
console.log(buf); | ||
return this.copyFrom(buf); | ||
}; | ||
WritableTrackingBuffer.prototype.writeUInt32BE = function(value) { | ||
@@ -114,0 +124,0 @@ var length; |
@@ -29,3 +29,3 @@ { | ||
], | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"main": "./lib/tedious.js", | ||
@@ -32,0 +32,0 @@ "repository": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
179151
5216