Skip to content

Commit 7b87c4e

Browse files
committed
Parse Menu Snapshot Into Construction: workaround for random chars
Signed-off-by: Filip Gołaś <[email protected]>
1 parent 390f6f5 commit 7b87c4e

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

lib/bios/menus.robot

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,13 @@ Parse Menu Snapshot Into Construction
365365
${line}= Remove String Using Regexp ${line} ^[\\|\\s/\\\\-]+$
366366
# If the resulting line is not empty, add it as a menu entry
367367
${length}= Get Length ${line}
368-
IF ${length} > 0 Append To List ${construction} ${line}
368+
${line_valid}= Evaluate ${length} > 0
369+
# A little workaround for random characters creating non-existent entries
370+
IF ${TELNET_FUZZY_MAX_INSERTIONS} + ${TELNET_FUZZY_MAX_ERRORS} > 0
371+
${line_valid}= Evaluate ($length > 1) or ($length > 0 and $line not in ["@", "`"])
372+
END
373+
374+
IF ${line_valid} Append To List ${construction} ${line}
369375
END
370376
Log ${construction}
371377
${construction}= Get Slice From List ${construction} ${slice_start} ${slice_end}

0 commit comments

Comments
 (0)