mirror of
https://github.com/raysan5/raylib.git
synced 2025-09-15 15:58:14 +00:00
Tweak to minimize buffer overflow possibility
This commit is contained in:
@@ -2664,7 +2664,7 @@ void TakeScreenshot(const char *fileName)
|
|||||||
unsigned char *imgData = rlReadScreenPixels(CORE.Window.render.width, CORE.Window.render.height);
|
unsigned char *imgData = rlReadScreenPixels(CORE.Window.render.width, CORE.Window.render.height);
|
||||||
Image image = { imgData, CORE.Window.render.width, CORE.Window.render.height, 1, PIXELFORMAT_UNCOMPRESSED_R8G8B8A8 };
|
Image image = { imgData, CORE.Window.render.width, CORE.Window.render.height, 1, PIXELFORMAT_UNCOMPRESSED_R8G8B8A8 };
|
||||||
|
|
||||||
char path[512] = { 0 };
|
char path[2048] = { 0 };
|
||||||
strcpy(path, TextFormat("%s/%s", CORE.Storage.basePath, fileName));
|
strcpy(path, TextFormat("%s/%s", CORE.Storage.basePath, fileName));
|
||||||
|
|
||||||
ExportImage(image, path);
|
ExportImage(image, path);
|
||||||
|
Reference in New Issue
Block a user