A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Don't memset to zero
[simgrid.git]
/
src
/
bindings
/
lua
/
lua_utils.c
diff --git
a/src/bindings/lua/lua_utils.c
b/src/bindings/lua/lua_utils.c
index
84b8ca2
..
3f1f523
100644
(file)
--- a/
src/bindings/lua/lua_utils.c
+++ b/
src/bindings/lua/lua_utils.c
@@
-103,7
+103,9
@@
const char* sglua_get_spaces(int length) {
static char spaces[128];
xbt_assert(length < 128);
- memset(spaces, ' ', length);
+ if (length != 0) {
+ memset(spaces, ' ', length);
+ }
spaces[length] = '\0';
return spaces;
}