diff options
| author | Jeroen van Rijn <Kelimion@users.noreply.github.com> | 2025-06-24 17:02:20 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-06-24 17:02:20 +0200 |
| commit | 62e797b9d15d32b7db906e99e98f0943bf2aa6e3 (patch) | |
| tree | 3307829273d3b1c14df8631141bceb53e04584c3 | |
| parent | ebdf2e17f3fa445b5c64f16e5c077c0e710b3463 (diff) | |
| parent | fb3bccdd3e31c8c237721f6658722e0bfb54e71c (diff) | |
Merge pull request #5406 from Airtz/addendum-5402
Fix an oversight in PR #5402
| -rw-r--r-- | src/check_stmt.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/check_stmt.cpp b/src/check_stmt.cpp index 620e9fb74..07801b477 100644 --- a/src/check_stmt.cpp +++ b/src/check_stmt.cpp @@ -2481,8 +2481,7 @@ gb_internal void check_assign_stmt(CheckerContext *ctx, Ast *node) { check_expr(ctx, &lhs, as->lhs[0]); check_binary_expr(ctx, &rhs, binary_expr, nullptr, true); if (rhs.mode != Addressing_Invalid) { - // NOTE(bill): Only use the first one will be used - be->op.string = substring(be->op.string, 0, 1); + be->op.string = substring(be->op.string, 0, be->op.string.len - 1); rhs.expr = binary_expr; check_assignment_variable(ctx, &lhs, &rhs, str_lit("assignment operation")); } |