parent
dc43071f1c
commit
20faa99464
|
|
@ -156,6 +156,7 @@ Mladen Slijepcevic
|
||||||
Morten Borup Petersen
|
Morten Borup Petersen
|
||||||
Mostafa Gamal
|
Mostafa Gamal
|
||||||
Nandu Raj
|
Nandu Raj
|
||||||
|
Natan Kreimer
|
||||||
Nathan Graybeal
|
Nathan Graybeal
|
||||||
Nathan Kohagen
|
Nathan Kohagen
|
||||||
Nathan Myers
|
Nathan Myers
|
||||||
|
|
|
||||||
|
|
@ -181,7 +181,6 @@ class EmitCSyms final : EmitCBaseVisitorConst {
|
||||||
/// Then add/update entry in m_scopeNames if not already there
|
/// Then add/update entry in m_scopeNames if not already there
|
||||||
void varHierarchyScopes(string scp) {
|
void varHierarchyScopes(string scp) {
|
||||||
|
|
||||||
// we want no result to be -1, so use ints
|
|
||||||
string::size_type prd_pos = scp.rfind('.');
|
string::size_type prd_pos = scp.rfind('.');
|
||||||
string::size_type dot_pos = scp.rfind("__DOT__");
|
string::size_type dot_pos = scp.rfind("__DOT__");
|
||||||
|
|
||||||
|
|
@ -195,7 +194,7 @@ class EmitCSyms final : EmitCBaseVisitorConst {
|
||||||
}
|
}
|
||||||
|
|
||||||
// resize and advance pointers
|
// resize and advance pointers
|
||||||
if (prd_pos < dot_pos && dot_pos != string::npos) {
|
if ((prd_pos < dot_pos || prd_pos == string::npos) && dot_pos != string::npos) {
|
||||||
scp.resize(dot_pos);
|
scp.resize(dot_pos);
|
||||||
dot_pos = scp.rfind("__DOT__");
|
dot_pos = scp.rfind("__DOT__");
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue