Permalink
Browse files

fixed unpack bug

  • Loading branch information...
1 parent ee662b8 commit c4f781e0f71b82455a53caff88ec5caa0c8c8c78 @VanCoding committed Mar 22, 2013
Showing with 4 additions and 4 deletions.
  1. +4 −4 lib/index.js
View
@@ -92,18 +92,18 @@ function parseNBT(buffer,index){
function unpackNBT(data,cb){
cb = cb||noop;
- zlib.inflate(data,function(err,data){
+ zlib.inflate(data,function(err,d){
if(err){
- zlib.gunzip(data,function(err,data){
+ zlib.gunzip(data,function(err,d){
if(err){
cb(err);
}else{
- cb(null,parseNBT(data));
+ cb(null,parseNBT(d));
}
});
}else{
- cb(null,parseNBT(data));
+ cb(null,parseNBT(d));
}
});
}

0 comments on commit c4f781e

Please sign in to comment.