Merge branch 'master' of https://github.com/aarongut/cdb into mplamann

This commit is contained in:
Mitchell Plamann
2015-04-12 00:33:11 -04:00
33 changed files with 229 additions and 15 deletions

View File

@@ -24,7 +24,7 @@ ByteStream.prototype.get_u4 = function() {
ByteStream.prototype.get_i4 = function() {
var unsigned_val = this.get_u4();
var sign_mult = (unsigned_val & 0x80000000) ? -1 : 1;
return (unsigned_val & 0x7FFFFFFF) * sign_mult;
return (unsigned_val & 0x7FFFFFFF) + (unsigned_val & 0x80000000);
}
ByteStream.prototype.get_bytes = function(n) {