mirror of
https://github.com/lubosz/overte.git
synced 2025-04-07 18:02:08 +02:00
Fix mac launcher not correctly reading interface version
The logic to convert the interface output assumed that the output would be null terminated, but it was not.
This commit is contained in:
parent
3b138fe031
commit
b8887aa01e
1 changed files with 5 additions and 4 deletions
|
@ -33,10 +33,11 @@
|
|||
return 0;
|
||||
}
|
||||
|
||||
NSFileHandle * fh = [standardOut fileHandleForReading];
|
||||
NSData * data = [fh readDataToEndOfFile];
|
||||
NSString * output = [NSString stringWithUTF8String:[data bytes]];
|
||||
if (output == nil) {
|
||||
NSFileHandle* fh = [standardOut fileHandleForReading];
|
||||
NSData* data = [fh readDataToEndOfFile];
|
||||
|
||||
NSString* output = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
|
||||
if (output == nil || [output length] == 0) {
|
||||
NSDictionary * userInfo = @{
|
||||
NSLocalizedDescriptionKey: NSLocalizedString(@"Couldn't start interface", nil)
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue