You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This code incorrectly increments the recursionDepth variable. Someone debugging the code and looking at that value after the recursive call completed would see an incorrect value for recursionDepth.
This can be remedied by changing it to recursionDepth+1 in both cases.
The text was updated successfully, but these errors were encountered:
Good point. I replaced ++recursionDepth with recursionDepth + 1 in the above commit.
FYI, recursionDepth was not present in the Java implementation. It was added as a safeguard, and its only purpose is to prevent infinite recursion via this assertion:
During code review #103, we observed this code:
faradays-electromagnetic-lab/js/common/model/Electron.ts
Lines 199 to 201 in c503836
This code incorrectly increments the recursionDepth variable. Someone debugging the code and looking at that value after the recursive call completed would see an incorrect value for recursionDepth.
This can be remedied by changing it to
recursionDepth+1
in both cases.The text was updated successfully, but these errors were encountered: