diff options
| author | Erick Tryzelaar <erick.tryzelaar@gmail.com> | 2013-08-04 13:22:56 -0700 |
|---|---|---|
| committer | Erick Tryzelaar <erick.tryzelaar@gmail.com> | 2013-08-04 15:45:16 -0700 |
| commit | 5865a7597b060e81a6540b5d205b4a7d45a9b328 (patch) | |
| tree | d344bbaa99d685e53df4153dd0e266b2e8221596 /src/rt/rust_builtin.cpp | |
| parent | 17e0089856de145b10485c9a96bcf4f39e5b7f71 (diff) | |
| download | rust-5865a7597b060e81a6540b5d205b4a7d45a9b328.tar.gz rust-5865a7597b060e81a6540b5d205b4a7d45a9b328.zip | |
Remove trailing null from strings
Diffstat (limited to 'src/rt/rust_builtin.cpp')
| -rw-r--r-- | src/rt/rust_builtin.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/rt/rust_builtin.cpp b/src/rt/rust_builtin.cpp index d77a9f58a38..dffa7232e34 100644 --- a/src/rt/rust_builtin.cpp +++ b/src/rt/rust_builtin.cpp @@ -302,10 +302,9 @@ void tm_to_rust_tm(tm* in_tm, rust_tm* out_tm, int32_t gmtoff, if (zone != NULL) { size_t size = strlen(zone); - reserve_vec_exact(&out_tm->tm_zone, size + 1); + reserve_vec_exact(&out_tm->tm_zone, size); memcpy(out_tm->tm_zone->data, zone, size); - out_tm->tm_zone->fill = size + 1; - out_tm->tm_zone->data[size] = '\0'; + out_tm->tm_zone->fill = size; } } |
