time_rz: fix off-by-one typo
* lib/time_rz.c (extend_abbrs): Fix off-by-one typo.
author |
Paul Eggert <eggert@cs.ucla.edu> |
date |
Sat, 25 Jul 2015 15:10:16 -0700 |
parents |
af90c3b0922f |
children |
29e0bb74097d |
files |
ChangeLog lib/time_rz.c |
diffstat |
2 files changed, 6 insertions(+), 1 deletions(-)
[+]
|
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2015-07-25 Paul Eggert <eggert@cs.ucla.edu>
+
+ time_rz: fix off-by-one typo
+ * lib/time_rz.c (extend_abbrs): Fix off-by-one typo.
+
2015-07-23 Paul Eggert <eggert@cs.ucla.edu>
fprintftime, strftime: use timezone_t args
--- a/lib/time_rz.c
+++ b/lib/time_rz.c
@@ -109,7 +109,7 @@
extend_abbrs (char *abbrs, char const *abbr, size_t abbr_size)
{
memcpy (abbrs, abbr, abbr_size);
- abbrs[abbr_size + 1] = '\0';
+ abbrs[abbr_size] = '\0';
}
/* Return a newly allocated time zone for NAME, or NULL on failure.