1
0
forked from mirrors/0ad

Avoid maybe uninitialized warning with gcc

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
This commit is contained in:
Ralph Sennhauser
2025-03-03 21:23:56 +01:00
parent 9ef1bff6aa
commit 7494602de5
+1 -1
View File
@@ -132,7 +132,7 @@ template<typename T> inline bool FromJSVal_vector(const ScriptRequest& rq, JS::H
JS::RootedValue el(rq.cx);
if (!JS_GetElement(rq.cx, obj, i, &el))
FAIL("Failed to read array element");
T el2;
T el2{};
if (!Script::FromJSVal<T>(rq, el, el2))
return false;
out.push_back(el2);