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
This commit is contained in:
Vadim Zeitlin
2002-11-04 22:48:27 +00:00
parent 01f12b1adf
commit 21cb83e8c9
2 changed files with 2 additions and 8 deletions

View File

@@ -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;
}

View File

@@ -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;
}