Skip to content

Conversation

@kio-watanabe
Copy link
Contributor

There was a problem that the sign was changed when an INSPECT statement was executed for a negative number.
The cause was that putSign(1) is executed before getSign() is executed in init() of CobolInspect.java, which causes the sign to be changed in putSign().

putSign in CobolNumericField.java (lines 527-530)

        else {
            value = (byte) (value >= 0x70 ? value - 0x40 : value);
            this.getDataStorage().setByte(p, (byte) (sign < 0 ? value + 0x40 : value));
        }

Therefore, init() was modified so that getSign() is executed before putSign(1).

yutaro-sakamoto added a commit that referenced this pull request Nov 14, 2024
@yutaro-sakamoto
Copy link
Contributor

@kio-watanabe
The changes in this pull request are reflected in the following commit.
754f95c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants