summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Baumann <derflob@derflob.de>2015-12-23 00:40:17 +0100
committerFlorian Baumann <derflob@derflob.de>2015-12-23 00:40:17 +0100
commitb49cfe8195e76408ef7170c0ccdf2f8d81ee7f45 (patch)
tree687949265e1f92f20b1a8060cd5423c6714c5285
parentf813305068a3be01d4f16fa65815e5ee71fcd16d (diff)
downloadmFeTAp-b49cfe8195e76408ef7170c0ccdf2f8d81ee7f45.tar.gz
mFeTAp-b49cfe8195e76408ef7170c0ccdf2f8d81ee7f45.tar.bz2
fix latin char boundries
-rw-r--r--morse_code.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/morse_code.h b/morse_code.h
index 22b1373..ffb7b65 100644
--- a/morse_code.h
+++ b/morse_code.h
@@ -56,9 +56,9 @@ uint16_t units_in_str(char *s, uint8_t l) {
}
uint16_t units_in_char(char *s) {
- if (*s > 41 && *s < 91) {
+ if (*s > 64 && *s < 91) {
return morse_code_len[*s - 65];
- } else if (*s > 97 && *s < 122) {
+ } else if (*s > 96 && *s < 122) {
return morse_code_len[*s - 97];
} else if (*s == ' ') {
return morse_code_len[26];
@@ -68,9 +68,9 @@ uint16_t units_in_char(char *s) {
}
uint8_t morse_unit(char *s, uint16_t u) {
- if (*s > 41 && *s < 91) {
+ if (*s > 64 && *s < 91) {
return morse_code[*s - 65] & (1 << u);
- } else if (*s > 97 && *s < 122) {
+ } else if (*s > 96 && *s < 122) {
return morse_code[*s - 97] & (1 << u);
} else if (*s == ' ') {
return 0;