Skip to content

Conversation

@ptrus
Copy link
Member

@ptrus ptrus commented Dec 22, 2025

No description provided.

@ptrus ptrus force-pushed the ptrus/bugfix/numeric-to-big-int branch from 5c6820f to ba6d086 Compare December 22, 2025 11:03
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes two critical bugs: one in NumericToBigInt that caused it to always return zero for negative exponents, and another in the balance update check that used pointer comparison instead of value comparison.

  • Fixes NumericToBigInt to return the calculated value instead of zero when handling negative exponents
  • Replaces incorrect pointer comparison with proper value comparison in balance update logic
  • Adds comprehensive test coverage for NumericToBigInt

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
common/types.go Fixed return value from *big0 to *bi in NumericToBigInt for negative exponent path, and simplified error return
common/types_test.go Added comprehensive test suite for NumericToBigInt covering zero, positive, and negative exponents
analyzer/runtime/runtime.go Changed balance comparison from pointer comparison (!= big.NewInt(0)) to value comparison (.Sign() != 0)
.changelog/1226.bugfix.md Documents the pointer comparison fix in analyzer/runtime
.changelog/1226.bugfix.2.md Documents the NumericToBigInt fix in common package

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ptrus ptrus merged commit 4ac582e into main Dec 22, 2025
20 checks passed
@ptrus ptrus deleted the ptrus/bugfix/numeric-to-big-int branch December 22, 2025 11:09
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