Skip to content

Commit

Permalink
fix malloc error.
Browse files Browse the repository at this point in the history
  • Loading branch information
u0u0 committed Feb 25, 2014
1 parent a15927e commit d271685
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions jsb/JSBTest/JSBTest/JSB_AUTO.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ void js_register(JSContext* cx, JSObject* global){
HASH_FIND_INT(_js_global_type_ht, &typeId, p);

if (!p) {
p = (js_type_class_t* )malloc(sizeof(_js_global_type_ht));
p = (js_type_class_t* )malloc(sizeof(js_type_class_t));
p->type = typeId;
p->jsclass = jsb_class;
p->proto = jsb_prototype;
Expand Down Expand Up @@ -201,4 +201,4 @@ void register_all(JSContext* cx, JSObject* obj){

JS_DefineFunction(cx, jsb_prototype, "retain", JSB_cocos2dx_retain, 0, JSPROP_READONLY | JSPROP_PERMANENT);
JS_DefineFunction(cx, jsb_prototype, "release", JSB_cocos2dx_release, 0, JSPROP_READONLY | JSPROP_PERMANENT);
}
}

0 comments on commit d271685

Please sign in to comment.