love.graphics.newBuffer: improve error message when the size is 0.

This commit is contained in:
Sasha Szpakowski
2026-08-26 00:44:22 -03:00
parent 48b5e1303d
commit f78ed8371e
+2 -2
View File
@@ -44,10 +44,10 @@ Buffer::Buffer(Graphics *gfx, const Settings &settings, const std::vector<DataDe
, immutable(false)
{
if (size == 0 && arraylength == 0)
throw love::Exception("Size or array length must be specified.");
throw love::Exception("Buffer size or array length must be greater than 0.");
if (bufferformat.size() == 0)
throw love::Exception("Data format must contain values.");
throw love::Exception("Buffer data format must contain values.");
const auto &caps = gfx->getCapabilities();