Fix bug in sdscatfmt when % is the last format char (#9173)
Fix bug in sdscatfmt when % is the last format char (#9173)

For the sdscatfmt function in sds.c, when the parameter fmt ended up with '%',
the behavior is undefined. This commit fix this bug.

Co-authored-by: stafuc <e8d7990f89f5ced63038bde142b753e42289d5d0@gmail.com>
JackieXie168/redis,JackieXie168/redis,JackieXie168/redis,JackieXie168/redis