mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-25 10:48:41 +00:00
LibWeb/WebGL2: Correctly handle offsets in uniform(Matrix) functions
This commit is contained in:
committed by
Alexander Kalenik
parent
63b792c205
commit
2983ad10bc
@@ -923,14 +923,16 @@ public:
|
||||
|
||||
if (webgl_version == 2) {
|
||||
function_impl_generator.append(R"~~~(
|
||||
if (src_offset + src_length > (count * matrix_size)) {
|
||||
set_error(GL_INVALID_VALUE);
|
||||
return;
|
||||
}
|
||||
|
||||
raw_data += src_offset;
|
||||
if (src_length == 0) {
|
||||
count -= src_offset;
|
||||
}
|
||||
|
||||
if (src_offset + src_length <= count) {
|
||||
set_error(GL_INVALID_VALUE);
|
||||
return;
|
||||
} else {
|
||||
count = src_length;
|
||||
}
|
||||
)~~~");
|
||||
}
|
||||
@@ -975,14 +977,16 @@ public:
|
||||
|
||||
if (webgl_version == 2) {
|
||||
function_impl_generator.append(R"~~~(
|
||||
if (src_offset + src_length > count) {
|
||||
set_error(GL_INVALID_VALUE);
|
||||
return;
|
||||
}
|
||||
|
||||
data += src_offset;
|
||||
if (src_length == 0) {
|
||||
count -= src_offset;
|
||||
}
|
||||
|
||||
if (src_offset + src_length <= count) {
|
||||
set_error(GL_INVALID_VALUE);
|
||||
return;
|
||||
} else {
|
||||
count = src_length;
|
||||
}
|
||||
)~~~");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user