Skip to content

Commit 77b7932

Browse files
committed
nit: now unravelreplicas has a correcter behaviour (see basic/rt-make-getwords)
1 parent b81b390 commit 77b7932

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

regtest/basic/rt-make-getwords/output.reference

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,11 @@ Replica: 2
5858
3
5959
"@replicas:{{1,2,3} {0,0,0} {2,4,6}}"
6060
Replica: 0
61-
{1,2,
61+
{1,2,3}
6262
Replica: 1
63-
{0,0,
63+
{0,0,0}
6464
Replica: 2
65-
{2,4,
65+
{2,4,6}
6666
"@replicas:1 2 3"
6767
Replica: 0
6868
1

src/tools/Tools.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -510,10 +510,14 @@ void getWords_replicas(gch::small_vector<std::string_view> & words,
510510
++parlevel;
511511
if(parlevel == 1) {
512512
init = i+1;
513+
} else {
514+
++size;
513515
}
514516
} else if(line[i] == closePar) {
515517
--parlevel;
518+
++size;
516519
if(parlevel == 0) {
520+
--size;
517521
break;
518522
}
519523
} else {

0 commit comments

Comments
 (0)