Skip to content

Commit

Permalink
More fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pubby committed Jun 13, 2023
1 parent c415a07 commit 7e3513d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions examples/build_all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@
../nesfab counter/counter.cfg
../nesfab fade/fade.cfg
../nesfab sound_effects/sound_effects.cfg
../nesfab trig/trig.cfg
6 changes: 5 additions & 1 deletion src/byteify.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,13 @@ static bm_t _get_bm(ssa_value_t value)
bm_t bm;
fixed_uint_t f = value.fixed().value;

type_name_t num_type = value.num_type_name();
if(!is_byteified(num_type))
num_type = TYPE_U;

for(unsigned i = 0; i < bm.size(); ++i)
{
bm[i] = ssa_value_t(f & 0xFF, TYPE_U);
bm[i] = ssa_value_t(f & 0xFF, num_type);
f >>= 8;
}
return bm;
Expand Down

0 comments on commit 7e3513d

Please sign in to comment.