update sproto, fix bug in sproto.default

This commit is contained in:
Cloud Wu
2016-04-20 10:11:55 +08:00
parent f56d777cc2
commit c5fb93823a

View File

@@ -604,6 +604,8 @@ encode_default(const struct sproto_arg *args) {
lua_pushstring(L, args->tagname);
if (args->index > 0) {
lua_newtable(L);
lua_rawset(L, -3);
return SPROTO_CB_NOARRAY;
} else {
switch(args->type) {
case SPROTO_TINTEGER:
@@ -621,9 +623,9 @@ encode_default(const struct sproto_arg *args) {
lua_setfield(L, -2, "__type");
break;
}
}
lua_rawset(L, -3);
return 0;
return SPROTO_CB_NIL;
}
}
/*