Skip to content

Commit 9ac23e4

Browse files
author
minggo
committed
2 parents f09592d + 9d0ecc4 commit 9ac23e4

File tree

6 files changed

+9
-1
lines changed

6 files changed

+9
-1
lines changed

AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ Developers:
196196

197197
xyhl515
198198
Fixed a bug that CCControlSwitch::setOn(isOn,false) doesn't work.
199+
Adds VS2012 Express template installing support.
199200

200201
DarraghCoy
201202
Fix for unaligned memory access crash in CCBReader::readFloat().
-224 KB
Binary file not shown.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
9f7be42cbdf2ecadd9209f4c0e1b0b9359bba4c8
0 Bytes
Binary file not shown.

scripting/javascript/bindings/ScriptingCore.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1283,6 +1283,12 @@ jsval ccdictionary_to_jsval(JSContext* cx, CCDictionary* dict)
12831283

12841284
JSBool jsval_to_ccdictionary(JSContext* cx, jsval v, CCDictionary** ret) {
12851285

1286+
if(JSVAL_IS_NULL(v) || JSVAL_IS_VOID(v))
1287+
{
1288+
*ret = NULL;
1289+
return JS_TRUE;
1290+
}
1291+
12861292
JSObject *itEl = JS_NewPropertyIterator(cx, JSVAL_TO_OBJECT(v));
12871293
JSBool ok = JS_TRUE;
12881294
CCDictionary* dict = NULL;

scripting/javascript/bindings/cocos2d_specifics.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -607,7 +607,7 @@ JSBool js_cocos2dx_CCAnimation_create(JSContext *cx, uint32_t argc, jsval *vp)
607607
} else if (argc == 3) {
608608
unsigned int loops;
609609
ok &= JS_ValueToNumber(cx, argv[1], &arg1);
610-
ok &= jsval_to_uint32(cx, argv[1], &loops);
610+
ok &= jsval_to_uint32(cx, argv[2], &loops);
611611
JSB_PRECONDITION2(ok, cx, JS_FALSE, "Error processing arguments");
612612
ret = cocos2d::CCAnimation::create(arg0, arg1, loops);
613613
} else if (argc == 1) {

0 commit comments

Comments
 (0)