[vala/staging] vala: Break possible endless loop in SymbolResolver.get_type_for_struct()
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/staging] vala: Break possible endless loop in SymbolResolver.get_type_for_struct()
- Date: Wed, 28 Nov 2018 17:09:47 +0000 (UTC)
commit aecfc1fbf427f41aa2fe33cdbd3d111c90385a1f
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Wed Nov 28 17:49:53 2018 +0100
vala: Break possible endless loop in SymbolResolver.get_type_for_struct()
Required to deal with invalid code containing base struct cycles.
Fixes https://gitlab.gnome.org/GNOME/vala/issues/444
vala/valasymbolresolver.vala | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/vala/valasymbolresolver.vala b/vala/valasymbolresolver.vala
index 8bbd63323..0ec273a8b 100644
--- a/vala/valasymbolresolver.vala
+++ b/vala/valasymbolresolver.vala
@@ -324,7 +324,7 @@ public class Vala.SymbolResolver : CodeVisitor {
}
DataType get_type_for_struct (Struct st, Struct base_struct) {
- if (st.base_type != null) {
+ if (st != base_struct && st.base_type != null) {
// make sure that base type is resolved
if (current_scope == st.scope) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]