Sidenote on a point that i havent explored yet myself: if the weaponname is exactly 32 chars long, the \0 might be missing, so it could be beneficial to strncpy it with a \0 at the end.