summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorraysan5 <[email protected]>2021-11-18 10:25:28 +0100
committerraysan5 <[email protected]>2021-11-18 10:25:28 +0100
commit7755cd0019e06fb0683b5ec6501d42457bd793c5 (patch)
tree9ccf5faec801dc93d7fcbd641136c72f0a9a2dcc
parent3a9f089018b3c6f6113150a69c8d5a21c578552a (diff)
downloadraylib-7755cd0019e06fb0683b5ec6501d42457bd793c5.tar.gz
raylib-7755cd0019e06fb0683b5ec6501d42457bd793c5.zip
Tweak to minimize buffer overflow possibility
-rw-r--r--src/rcore.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rcore.c b/src/rcore.c
index d6a0a224..ec1601ca 100644
--- a/src/rcore.c
+++ b/src/rcore.c
@@ -2664,7 +2664,7 @@ void TakeScreenshot(const char *fileName)
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 };
- char path[512] = { 0 };
+ char path[2048] = { 0 };
strcpy(path, TextFormat("%s/%s", CORE.Storage.basePath, fileName));
ExportImage(image, path);