fixup! merge master and mv FindDevIL to cmake-modules
parent
83db3fc084
commit
c0c480a4cb
|
@ -57,7 +57,7 @@ namespace pmx
|
||||||
std::string result;
|
std::string result;
|
||||||
|
|
||||||
const char* sourceStart = buffer.data();
|
const char* sourceStart = buffer.data();
|
||||||
const unsigned int targetSize = size * 3;
|
const unsigned int targetSize = size * 3; // enough to encode
|
||||||
char* targetStart = new char[targetSize]();
|
char* targetStart = new char[targetSize]();
|
||||||
const char* targetReserved = targetStart;
|
const char* targetReserved = targetStart;
|
||||||
ConversionFlags flags = ConversionFlags::lenientConversion;
|
ConversionFlags flags = ConversionFlags::lenientConversion;
|
||||||
|
@ -70,7 +70,7 @@ namespace pmx
|
||||||
throw DeadlyImportError( "Convert " + std::string(sourceStart) + " to UTF8 is not valid." );
|
throw DeadlyImportError( "Convert " + std::string(sourceStart) + " to UTF8 is not valid." );
|
||||||
}
|
}
|
||||||
|
|
||||||
result.assign(targetReserved, targetSize);
|
result.assign(targetReserved, targetStart - targetReserved);
|
||||||
delete[] targetReserved;
|
delete[] targetReserved;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue