From 7e3513d634d9b74dc1705e33327b63c322be707a Mon Sep 17 00:00:00 2001 From: Pubby Date: Mon, 12 Jun 2023 22:52:18 -0500 Subject: [PATCH] More fixes --- examples/build_all.sh | 1 + src/byteify.cpp | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/examples/build_all.sh b/examples/build_all.sh index 6e367168..fb992cab 100755 --- a/examples/build_all.sh +++ b/examples/build_all.sh @@ -12,3 +12,4 @@ ../nesfab counter/counter.cfg ../nesfab fade/fade.cfg ../nesfab sound_effects/sound_effects.cfg +../nesfab trig/trig.cfg diff --git a/src/byteify.cpp b/src/byteify.cpp index 4efd2087..5163ee85 100644 --- a/src/byteify.cpp +++ b/src/byteify.cpp @@ -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;