mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-11 08:40:44 +00:00
Fix missing nul terminator causing occasional launch failures under win32
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@21036 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
71ce433dad
commit
fe7fbf59b4
2 changed files with 8 additions and 4 deletions
|
@ -1,3 +1,7 @@
|
|||
2005-04-02 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSTask.m: Fix missing nul terminator to arguments under win32
|
||||
|
||||
2005-04-01 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSBundle.m: Minor debug/warning log tweaks.
|
||||
|
|
|
@ -1082,11 +1082,10 @@ quotedFromString(NSString *aString)
|
|||
}
|
||||
|
||||
lpath = [self _fullLaunchPath];
|
||||
wexecutable = [[lpath localFromOpenStepPath] unicharString];
|
||||
lpath = [lpath localFromOpenStepPath];
|
||||
wexecutable = [lpath unicharString];
|
||||
|
||||
args = [[NSMutableString alloc] initWithString:
|
||||
quotedFromString([NSString stringWithCharacters: wexecutable
|
||||
length: wcslen(wexecutable)])];
|
||||
args = [[NSMutableString alloc] initWithString: quotedFromString(lpath)];
|
||||
arg_enum = [[self arguments] objectEnumerator];
|
||||
while ((arg = [arg_enum nextObject]))
|
||||
{
|
||||
|
@ -1097,6 +1096,7 @@ quotedFromString(NSString *aString)
|
|||
w_args = NSZoneMalloc(NSDefaultMallocZone(),
|
||||
sizeof(wchar_t) * ([args length] + 1));
|
||||
[args getCharacters: (unichar*)w_args];
|
||||
w_args[[args length]] = 0;
|
||||
|
||||
env = [self environment];
|
||||
if ([env count] > 0)
|
||||
|
|
Loading…
Reference in a new issue