]> git.tdb.fi Git - libs/gl.git/blobdiff - source/core/buffer.cpp
Remove support for array size specialization from the engine as well
[libs/gl.git] / source / core / buffer.cpp
index 557e576d2ac929e256646c0a3cdc59bd3887a962..240fcd72754b67babe7a28b9ee2fe42a80f1fe4b 100644 (file)
@@ -33,6 +33,8 @@ void Buffer::sub_data(size_t off, size_t sz, const void *d)
 {
        if(size==0)
                throw invalid_operation("Buffer::sub_data");
+       if(off>size || off+sz>size)
+               throw out_of_range("Buffer::sub_data");
 
        BufferBackend::sub_data(off, sz, d);
 }