We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0d8d514 commit 5611806Copy full SHA for 5611806
cocos2d/core/utils/BinaryLoader.js
@@ -50,7 +50,7 @@ cc.loader.loadBinary = function (url, cb) {
50
} else {
51
if (xhr.overrideMimeType) xhr.overrideMimeType("text\/plain; charset=x-user-defined");
52
xhr.onload = function () {
53
- xhr.readyState === 4 && xhr.status === 200 ? cb(null, xhr.response) : cb(errInfo);
+ xhr.readyState === 4 && xhr.status === 200 ? cb(null, new Uint8Array(xhr.response)) : cb(errInfo);
54
};
55
}
56
xhr.send(null);
@@ -104,7 +104,7 @@ cc.loader.loadBinarySync = function (url) {
104
return null;
105
106
107
- arrayInfo = req.response;
+ arrayInfo = new Uint8Array(req.response);
108
109
return arrayInfo;
110
0 commit comments