Mercurial > MadButterfly
changeset 1165:9f2b5a1a0d84
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.
author | Thinker K.F. Li <thinker@codemud.net> |
---|---|
date | Wed, 29 Dec 2010 14:58:06 +0800 |
parents | 2cb5047d8f2b |
children | d73ef03c96de |
files | src/shape_path.c |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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);