1
1
Fork 0
mirror of https://github.com/boxgaming/qbjs.git synced 2024-09-19 20:14:58 +00:00

Allows CLOSE to be called without parameters

CLOSE should invalidate all open handles when called with no parameters;
This commit is contained in:
Fellippe Heitor 2023-06-01 00:30:34 -03:00
parent 97406a891d
commit 1f20565471

6
qb.js
View file

@ -1064,6 +1064,12 @@ var QB = new function() {
};
this.sub_Close = function(fh) {
if (!fh) {
for (const key in _fileHandles) {
delete _fileHandles[key];
}
return;
}
if (!_fileHandles[fh]) {
throw new Error("Invalid file handle");
}