From 397b0445887ce393ff7cc2f85f4951ed2da1b3a4 Mon Sep 17 00:00:00 2001 From: Richard Fine Date: Sat, 5 Jan 2019 12:53:08 +0000 Subject: [PATCH] Use safe_strcat instead of strcat_s strcat_s is not available on all platforms, and we have a utility in the codebase that does basically the same thing already. --- src/openrct2-ui/windows/Guest.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/openrct2-ui/windows/Guest.cpp b/src/openrct2-ui/windows/Guest.cpp index 1b0c637696..0e49738ab2 100644 --- a/src/openrct2-ui/windows/Guest.cpp +++ b/src/openrct2-ui/windows/Guest.cpp @@ -2345,14 +2345,14 @@ void window_guest_debug_paint(rct_window* w, rct_drawpixelinfo* dpi) snprintf(buffer, sizeof(buffer), "Next: %i, %i, %i", peep->next_x, peep->next_y, peep->next_z); if (peep->GetNextIsSurface()) - strcat_s(buffer, " (surface)"); + safe_strcat(buffer, " (surface)", sizeof(buffer)); if (peep->GetNextIsSloped()) { - strcat_s(buffer, " (slope "); + safe_strcat(buffer, " (slope ", sizeof(buffer)); char slopeDir[10]; _itoa(peep->GetNextDirection(), slopeDir, 10); - strcat_s(buffer, slopeDir); - strcat_s(buffer, ")"); + safe_strcat(buffer, slopeDir, sizeof(buffer)); + safe_strcat(buffer, ")", sizeof(buffer)); } gfx_draw_string(dpi, buffer, COLOUR_BLACK, x, y); y += LIST_ROW_HEIGHT;