mirror of
https://github.com/love2d/love.git
synced 2026-08-28 18:26:55 +02:00
love.graphics.newBuffer: improve error message when the size is 0.
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user