From 3dd388ac66580e72f56826d142ef69d2525188b7 Mon Sep 17 00:00:00 2001 From: Aleos Date: Thu, 25 Jul 2019 09:56:34 -0400 Subject: [PATCH] Corrected a compile warning on GCC 8 (#4263) * Fixes #4158. Thanks to @gengstergile! --- src/char/char_clif.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/char/char_clif.cpp b/src/char/char_clif.cpp index bf88b3b449..ab2ba963dd 100644 --- a/src/char/char_clif.cpp +++ b/src/char/char_clif.cpp @@ -290,7 +290,7 @@ int chclif_parse_pincode_setnew( int fd, struct char_session_data* sd ){ if( pincode_allowed(newpin) ){ chlogif_pincode_notifyLoginPinUpdate( sd->account_id, newpin ); - strncpy( sd->pincode, newpin, strlen( newpin ) ); + strncpy( sd->pincode, newpin, sizeof( newpin ) ); chclif_pincode_sendstate( fd, sd, PINCODE_PASSED ); }else{