Skip to content

Commit 28d5bfc

Browse files
committed
disas/m68k: Replace sprintf() by snprintf()
sprintf() is deprecated on Darwin since macOS 13.0 / XCode 14.1, resulting in painful developper experience. Use snprintf() instead. Signed-off-by: Philippe Mathieu-Daudé <[email protected]> Reviewed-by: Richard Henderson <[email protected]> Reviewed-by: Peter Maydell <[email protected]> Message-Id: <[email protected]> Signed-off-by: Richard Henderson <[email protected]>
1 parent a93b406 commit 28d5bfc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

disas/m68k.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1000,7 +1000,7 @@ print_indexed (int basereg,
10001000

10011001
/* Generate the text for the index register.
10021002
Where this will be output is not yet determined. */
1003-
sprintf (buf, "%s:%c%s",
1003+
snprintf(buf, sizeof(buf), "%s:%c%s",
10041004
reg_names[(word >> 12) & 0xf],
10051005
(word & 0x800) ? 'l' : 'w',
10061006
scales[(word >> 9) & 3]);

0 commit comments

Comments
 (0)