# HG changeset patch # User Thinker K.F. Li # Date 1293605886 -28800 # Node ID 9f2b5a1a0d84829c7977ea3a1455f08321d444d2 # Parent 2cb5047d8f2bf874318b7e10f31a6d6397fe647e Fix bug of unpredicatible output of tank. - This issue was reported by an Ali guy. He find tank would generate unpredicatible output when playing a boom. - rdman_shape_path_new_from_binary() does not copy zero byte (\x00) of command string. It is requested by sh_path_path() to detect end of command string. - Fixed by coping zero byte. diff -r 2cb5047d8f2b -r 9f2b5a1a0d84 src/shape_path.c --- a/src/shape_path.c Wed Dec 29 00:33:48 2010 +0800 +++ b/src/shape_path.c Wed Dec 29 14:58:06 2010 +0800 @@ -1190,7 +1190,7 @@ } path->dev_data = path->user_data + msz; - memcpy(path->user_data, commands, strlen(commands)); + memcpy(path->user_data, commands, strlen(commands) + 1); memcpy(path->user_data + cmd_cnt, pnts, sizeof(co_aix) * pnt_cnt); memcpy(path->user_data + cmd_cnt + pnt_cnt * sizeof(co_aix), float_args, sizeof(co_aix) * float_arg_cnt);