mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-12 01:18:53 +00:00
[flang] runtime: fix formatted real input regression w/ spaces
Blank input fields must be interpreted as zero, including the case of virutal space characters generated from record padding at the end of an input record. This stopped working sometime in the past few months for real input (not sure when); here's a fix. This bug was breaking FCVS test fm111. Differential Revision: https://reviews.llvm.org/D110765
This commit is contained in:
parent
95f824ad7c
commit
f63dafebf4
@ -137,7 +137,8 @@ static int ScanRealInput(char *buffer, int bufferSize, IoStatementState &io,
|
|||||||
if (ScanNumericPrefix(io, edit, next, remaining)) {
|
if (ScanNumericPrefix(io, edit, next, remaining)) {
|
||||||
Put('-');
|
Put('-');
|
||||||
}
|
}
|
||||||
if (!next) { // empty field means zero
|
if (next.value_or(' ') == ' ') { // empty/blank field means zero
|
||||||
|
remaining.reset();
|
||||||
Put('0');
|
Put('0');
|
||||||
return got;
|
return got;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user