Skip to content

Commit

Permalink
Fix build warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
MikePopoloski committed Dec 21, 2024
1 parent 0e90d68 commit 1f019c5
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions source/ast/SFormat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -377,16 +377,17 @@ struct TypeVisitor {

buffer.append("'{");
for (auto& field : type.membersOfType<FieldSymbol>()) {
auto& type = field.getType();
auto elem = value.slice(currOffset - 1, currOffset - type.getBitWidth());
currOffset -= type.getBitWidth();
auto& fieldType = field.getType();
auto fieldWidth = int32_t(fieldType.getBitWidth());
auto elem = value.slice(currOffset - 1, currOffset - fieldWidth);
currOffset -= fieldWidth;

if (!abbreviated) {
buffer.append(field.name);
buffer.append(":");
}

type.visit(*this, elem);
fieldType.visit(*this, elem);

buffer.append(",");
if (!abbreviated)
Expand Down

0 comments on commit 1f019c5

Please sign in to comment.