mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-09-04 11:45:18 +02:00
Fix small bug that was preventing some shaders from loading.
This commit is contained in:
+2
-1
@@ -62,8 +62,9 @@ uint8_t *AssetsAssetReader::ReadAsset(const char *path, size_t *size) {
|
||||
if (!asset.open(QIODevice::ReadOnly))
|
||||
return 0;
|
||||
|
||||
uint8_t *contents = new uint8_t[asset.size()];
|
||||
uint8_t *contents = new uint8_t[asset.size()+1];
|
||||
memcpy(contents, (uint8_t*)asset.readAll().data(), asset.size());
|
||||
contents[asset.size()] = 0;
|
||||
*size = asset.size();
|
||||
asset.close();
|
||||
return contents;
|
||||
|
||||
Reference in New Issue
Block a user