Skip to content
Snippets Groups Projects
Commit 7c7f7853 authored by deuce's avatar deuce
Browse files

Use valueOf() for testing Boolean types since the defaults don't actually

work otherwise for some incomprehensible reason.
parent accfb7f4
Branches
Tags
No related merge requests found
......@@ -78,7 +78,7 @@ function RecordFile_ReadField(fieldtype)
var tmp=this.file.read(8);
return(tmp.replace(/\x00/g,""));
case "Boolean":
if(this.file.readBin(1))
if(this.file.readBin(1) > 0)
return(true);
return(false);
default:
......@@ -135,7 +135,7 @@ function RecordFile_WriteField(val, fieldtype, def)
this.file.write(wr,8);
break;
case "Boolean":
if(val)
if(val.valueOf())
this.file.writeBin(255,1);
else
this.file.writeBin(0,1);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment