diff options
author | Sergey Starosek <sergey.starosek@gmail.com> | 2013-02-03 12:22:10 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-02-03 21:27:25 +1100 |
commit | 5cc6e210646f82a353cdd25bf9e9e464e113220d (patch) | |
tree | cdb511c4299c268d6c793a4c13c8aab2288c81bf /planner.c | |
parent | a4da88f1ab78d0445deb4a403aa7b035e110bda9 (diff) | |
download | subsurface-5cc6e210646f82a353cdd25bf9e9e464e113220d.tar.gz |
Increase the buffer for the gas text in planner
UTF-8 strings could create more characters.
Signed-off-by: Sergey Starosek <sergey.starosek@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'planner.c')
-rw-r--r-- | planner.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -536,7 +536,7 @@ static void add_plan_to_notes(struct diveplan *diveplan, struct dive *dive) for (gasidx = 0; gasidx < MAX_CYLINDERS; gasidx++) { double volume; const char *unit; - char gas[12]; + char gas[64]; if (consumption[gasidx] == 0) continue; len = strlen(buffer); @@ -729,7 +729,7 @@ static int validate_gas(const char *text, int *o2_p, int *he_p) return 0; if (!strcasecmp(text, _("air"))) { - o2 = O2_IN_AIR; he = 0; text += 3; + o2 = O2_IN_AIR; he = 0; text += strlen(_("air")); } else if (!strncasecmp(text, _("ean"), 3)) { o2 = get_permille(text+3, &text); he = 0; } else { |