From 21cb83e8c92ba59e662136f8261b095ee48083e7 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 4 Nov 2002 22:48:27 +0000 Subject: [PATCH] replaced buffer copy and strcmp() with strncmp() (patch 632155) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@17713 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/mac/app.cpp | 5 +---- src/mac/carbon/app.cpp | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/mac/app.cpp b/src/mac/app.cpp index 6bf53b8546..58ee010fa4 100644 --- a/src/mac/app.cpp +++ b/src/mac/app.cpp @@ -925,10 +925,7 @@ int wxEntry( int argc, char *argv[] , bool enterLoop ) // application (otherwise applications would need to handle it) if (argc > 1) { - char theArg[6] = ""; - strncpy(theArg, argv[1], 5); - - if (strcmp(theArg, "-psn_") == 0) { + if (strncmp(argv[1], "-psn_", 5) == 0) { // assume the argument is always the only one and remove it --argc; } diff --git a/src/mac/carbon/app.cpp b/src/mac/carbon/app.cpp index 6bf53b8546..58ee010fa4 100644 --- a/src/mac/carbon/app.cpp +++ b/src/mac/carbon/app.cpp @@ -925,10 +925,7 @@ int wxEntry( int argc, char *argv[] , bool enterLoop ) // application (otherwise applications would need to handle it) if (argc > 1) { - char theArg[6] = ""; - strncpy(theArg, argv[1], 5); - - if (strcmp(theArg, "-psn_") == 0) { + if (strncmp(argv[1], "-psn_", 5) == 0) { // assume the argument is always the only one and remove it --argc; }