mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2025-01-09 00:14:10 -08:00
Fix bug in generation of block labels
This commit is contained in:
parent
b28f5a6b71
commit
299485eb96
|
@ -315,7 +315,7 @@ public class StatementRenderer implements ExprVisitor, StatementVisitor {
|
||||||
private String generateBlockId(int index) {
|
private String generateBlockId(int index) {
|
||||||
int mappedIndex;
|
int mappedIndex;
|
||||||
while (blockIds.size() <= index) {
|
while (blockIds.size() <= index) {
|
||||||
mappedIndex = blockIndexMap.isEmpty() ? -1 : blockIndexMap.get(blockIds.size());
|
mappedIndex = blockIndexMap.isEmpty() ? -1 : blockIndexMap.get(blockIds.size() - 1);
|
||||||
mappedIndex++;
|
mappedIndex++;
|
||||||
while (RenderingUtil.KEYWORDS.contains(RenderingUtil.indexToId(mappedIndex))) {
|
while (RenderingUtil.KEYWORDS.contains(RenderingUtil.indexToId(mappedIndex))) {
|
||||||
mappedIndex++;
|
mappedIndex++;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user