summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2019-03-25 06:47:47 -0700
committerKaz Kylheku <kaz@kylheku.com>2019-03-25 06:47:47 -0700
commit2f1f4fd7e61baa5d86685a35c338fc225a8f073b (patch)
treed308cd16a99fddef611117995f3f2c920f1b63f5
parentc292315b720f9b5ba54206b71eeb98e2ee078f8f (diff)
downloadtxr-2f1f4fd7e61baa5d86685a35c338fc225a8f073b.tar.gz
txr-2f1f4fd7e61baa5d86685a35c338fc225a8f073b.tar.bz2
txr-2f1f4fd7e61baa5d86685a35c338fc225a8f073b.zip
plus: missing breaks.
* arith.c (plus): Add missing break statements to two switch cases. One is at the end, where it is not strictly necessary. The other omission is harmless also and may have been deliberate, though not commented by a /* fallthrough */. The other functions with this same pattern, namely minus, has the breaks.
-rw-r--r--arith.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arith.c b/arith.c
index 05814e37..28e61242 100644
--- a/arith.c
+++ b/arith.c
@@ -604,9 +604,11 @@ tail:
case TAG_PAIR(TAG_CHR, TAG_PTR):
if (type(bnum) == RNG)
return rcons(plus(anum, from(bnum)), plus(anum, to(bnum)));
+ break;
case TAG_PAIR(TAG_PTR, TAG_CHR):
if (type(anum) == RNG)
return rcons(plus(from(anum), bnum), plus(to(anum), bnum));
+ break;
}
invalid_ops(self, anum, bnum);
char_range: