Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2016-06-27 11:49:25 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2016-06-27 11:49:25 +0300
commit4a641e3cbc3bb57af42672bbf243a6af382eb5a0 (patch)
treeddc57dbc46cbd96b6aa5345e4be322c9dbdd5caa /intern/cycles/util/util_string.cpp
parentf1253f5d2b710d4a3b3fcb4534007877a136702c (diff)
Cycles: Fix corner case of human readable number returning empty string
Diffstat (limited to 'intern/cycles/util/util_string.cpp')
-rw-r--r--intern/cycles/util/util_string.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/intern/cycles/util/util_string.cpp b/intern/cycles/util/util_string.cpp
index e16a83d56d0..c1c5a6b084b 100644
--- a/intern/cycles/util/util_string.cpp
+++ b/intern/cycles/util/util_string.cpp
@@ -260,7 +260,11 @@ string string_human_readable_size(size_t size)
string string_human_readable_number(size_t num)
{
- /* add thousands separators */
+ if(num == 0) {
+ return "0";
+ }
+
+ /* Add thousands separators. */
char buf[32];
char* p = buf+31;