Skip to content
This repository was archived by the owner on Apr 3, 2020. It is now read-only.

Commit 73a2ab8

Browse files
hujiajieRaphael Kubo da Costa
authored and
Raphael Kubo da Costa
committed
[Android] Fix an error in extracting WebCL kernel parameter list.
The second argument passed to String::substring should be the length instead of the end position. BUG=XWALK-4481
1 parent 7552f3a commit 73a2ab8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Source/modules/webcl/WebCLProgram.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ void WebCLProgram::build(const Vector<RefPtr<WebCLDevice>>& devices, const Strin
309309
}
310310

311311
size_t closeBraket = m_programSource.find(")", openBraket);
312-
String arguments = m_programSource.substring(openBraket + 1, closeBraket - 1);
312+
String arguments = m_programSource.substring(openBraket + 1, closeBraket - openBraket - 1);
313313
if (arguments.contains("struct ") || arguments.contains("image1d_array_t ") || arguments.contains("image1d_buffer_t ") || arguments.contains("image1d_t ") || arguments.contains("image2d_array_t ")) {
314314
// 1. Kernel structure parameters aren't allowed;
315315
// 2. Kernel argument "image1d_t", "image1d_array_t", "image2d_array_t" and "image1d_buffer_t" aren't allowed;

0 commit comments

Comments
 (0)