Numeric arguments parsed with toInt() silently become 0, and the documented EXPECT … AT (r,c) form never matches
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 52/100
Direzione di ricerca
Start with the argument parsing code in src/script_parser.cpp, especially the listed toInt() call sites and the EXPECT coordinate handling. Compare the documented forms and reproduction examples in the issue with how each statement parses its arguments. Done means invalid numbers produce parse errors, documented variables work where expected, and EXPECT accepts parenthesised coordinates consistently.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
Numeric statement arguments are read with QString::toInt() without checking the result, and variables are not interpolated there. Non-numeric or overflowing values become 0; decimals are truncated.
Location
- File(s):
src/script_parser.cpp - Line(s) / function(s): L280–L296, L428–L432, L444–L448, L508–L518, L533, L567, L679–L681
Category
functional
Severity
medium
Loops and waits silently do nothing, and EXPECT with parenthesised coordinates always times out.
Reproduction / Evidence
Reproducible at runtime:
ADD $X $Nadds 0;REPEAT $Nruns 0 times;EXTRACT … FROM $N 1 LENGTH $Nreturns "".SET $P 1.5stores1;WAIT 2.5waits 2 ms.GLOBAL EXPECT_TIMEOUT 99999999999becomes 0 → next EXPECT times out at once.EXPECT CURSOR AT (1,1)andEXPECT TEXT "ABC" AT (1,1)always time out whileAT 1 1works (MOVE accepts the parenthesised form).- README examples
EXTRACT $line LINE $rowandTYPE $userdo not work.
Expected Behavior
Invalid numbers are parse errors; variables are allowed where documented; (r,c) is accepted consistently.
Actual Behavior
Silent zeros.
Root Cause
toInt() without the ok flag; argument grammar not shared between statements.
- Lingua principale
- C++
- Stelle
- 1
- Fork
- 2
- Merge medio
- 1h 34m
- PR unite (30g)
- 7
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di 5250ng/5250script
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
5250ng/5250script#30 ·
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
5250ng/5250script#27 ·
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
5250ng/5250script#25 ·
-
aidByteToKeyword maps 0xF5 to PAGEUP and 0xF4 to PAGEDOWN, so recorded Page Down replays as Page UpApertabug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
5250ng/5250script#20 ·
-
Function arguments are bound one at a time, so later arguments see already-rebound parametersApertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
5250ng/5250script#19 ·
Tutte le issue di 5250ng/5250script
Issue simili
-
Invalid-MissingHash/Commit/NotAC
Difficoltà 1/5 1-3 ore Idoneità per principianti 88/100
azerothcore/azerothcore-wotlk#28636 ·
I maintainer di solito rispondono entro 1 giorno
-
(S1 - Need confirmation)
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
CleverRaven/Cataclysm-DDA#89829 ·
I maintainer di solito rispondono entro 1 giorno
-
comp-documentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
ClickHouse/ClickHouse#136277 ·
I maintainer di solito rispondono entro 1 giorno
-
Flow Needs: Triage :mag:
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
react/react-native#60447 ·
I maintainer di solito rispondono entro 1 giorno
-
RecompLauncher supportAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
I maintainer di solito rispondono entro 1 giorno