strcpy bug. DecodeOptions bug.

This commit is contained in:
Jief L 2020-05-03 23:53:50 +03:00
parent 2e4aa64d3d
commit ce9538bb4e
4 changed files with 12 additions and 15 deletions

View File

@ -27,8 +27,6 @@
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
@ -38,8 +36,8 @@
ReferencedContainer = "container:cpp_tests.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
<Testables>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
@ -51,6 +49,7 @@
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
stopOnEveryMainThreadCheckerIssue = "YES"
migratedStopOnEveryIssue = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
@ -63,8 +62,6 @@
ReferencedContainer = "container:cpp_tests.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"

View File

@ -35,7 +35,7 @@ inline char* strcat(char* s1, const char* s2)
inline char* strcpy(char* dst, const char* src)
{
AsciiStrCpyS(dst,AsciiStrLen(dst)+1,src);
AsciiStrCpyS(dst,AsciiStrLen(src)+1,src);
return dst;
}

View File

@ -47,15 +47,15 @@ int XStringArray_tests()
}
{
XStringArray array = Split<XStringArray>("word1, word2, word3", ", ");
if ( array[0] != "word1"_XS8 ) return 31;
if ( array[1] != "word2"_XS8 ) return 32;
if ( array[2] != "word3"_XS8 ) return 33;
if ( array[0] != "word1"_XS8 ) return 41;
if ( array[1] != "word2"_XS8 ) return 42;
if ( array[2] != "word3"_XS8 ) return 43;
}
{
XStringArray array = Split<XStringArray>(" word1 word2 word3 "_XS8, " "_XS8);
if ( array[0] != "word1"_XS8 ) return 31;
if ( array[1] != "word2"_XS8 ) return 32;
if ( array[2] != "word3"_XS8 ) return 33;
if ( array[0] != "word1"_XS8 ) return 51;
if ( array[1] != "word2"_XS8 ) return 52;
if ( array[2] != "word3"_XS8 ) return 53;
}
{
XStringArray array = Split<XStringArray>(" word1 word2 word3 "_XS8, " "_XS8);

View File

@ -116,7 +116,7 @@ VOID DecodeOptions(REFIT_MENU_ITEM_BOOTNUM *Entry)
gSettings.NvidiaWeb = TRUE;
} else {
//Entry->LoadOptions = loaderEntry->LoadOptions;
Entry->LoadOptions = Split<XStringArray>(loaderEntry->LoadOptions.ConcatAll(" "_XS8).wc_str(), " ");
// Entry->LoadOptions = Split<XStringArray>(loaderEntry->LoadOptions.ConcatAll(" "_XS8).wc_str(), " ");
Entry->LoadOptions.AddID(ArgOptional[INX_NVWEBON]);
}
}
@ -125,7 +125,7 @@ VOID DecodeOptions(REFIT_MENU_ITEM_BOOTNUM *Entry)
gSettings.NvidiaWeb = FALSE;
} else {
//Entry->LoadOptions = loaderEntry->LoadOptions;
Entry->LoadOptions = Split<XStringArray>(loaderEntry->LoadOptions.ConcatAll(" "_XS8).wc_str(), " ");
// Entry->LoadOptions = Split<XStringArray>(loaderEntry->LoadOptions.ConcatAll(" "_XS8).wc_str(), " ");
Entry->LoadOptions.removeIC(ArgOptional[INX_NVWEBON]);
}
}