Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: potential bug on scale offset logic #167

Merged
merged 1 commit into from
Apr 8, 2024
Merged

Conversation

muktihari
Copy link
Owner

@muktihari muktihari commented Apr 8, 2024

Currently, in Profile.xlsx (v21.133) there is no field with scale == 1 and offset other than 0, but in case it happen, this following code in encoder/validator.go is problematic, if scale is 1 and offset is 20 then it become false && true -> false

if field.Scale != 1 && field.Offset != 0 { }
  • Verify and fix similar logic across files.

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (f670e1b) to head (b9295f8).

Additional details and impacted files
@@            Coverage Diff            @@
##            master      #167   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           42        42           
  Lines         3471      3471           
=========================================
  Hits          3471      3471           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@muktihari muktihari added the bug Something isn't working label Apr 8, 2024
@muktihari muktihari self-assigned this Apr 8, 2024
@muktihari muktihari merged commit 21db25f into master Apr 8, 2024
4 checks passed
@muktihari muktihari deleted the fix/scaleoffset-logic branch April 8, 2024 23:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants