Skip to content

Commit 3eb509a

Browse files
authored
Merge pull request #3528 from pandamicro/develop
Fix QA issues
2 parents 0d8d514 + f63c49d commit 3eb509a

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

Diff for: cocos2d/core/utils/BinaryLoader.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ cc.loader.loadBinary = function (url, cb) {
5050
} else {
5151
if (xhr.overrideMimeType) xhr.overrideMimeType("text\/plain; charset=x-user-defined");
5252
xhr.onload = function () {
53-
xhr.readyState === 4 && xhr.status === 200 ? cb(null, xhr.response) : cb(errInfo);
53+
xhr.readyState === 4 && xhr.status === 200 ? cb(null, new Uint8Array(xhr.response)) : cb(errInfo);
5454
};
5555
}
5656
xhr.send(null);
@@ -104,7 +104,7 @@ cc.loader.loadBinarySync = function (url) {
104104
return null;
105105
}
106106

107-
arrayInfo = req.response;
107+
arrayInfo = new Uint8Array(req.response);
108108
}
109109
return arrayInfo;
110110
};

Diff for: cocos2d/shaders/CCGLProgram.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@ cc.GLProgram = cc.Class.extend(/** @lends cc.GLProgram# */{
6363
updated = true;
6464
} else {
6565
for (var i = 0; i < args.length; i += 1) {
66-
if (args[i] !== element[i]) {
66+
// Array and Typed Array inner values could be changed, so we must update them
67+
if (args[i] !== element[i] || typeof args[i] === 'object') {
6768
element[i] = args[i];
6869
updated = true;
6970
}

0 commit comments

Comments
 (0)