Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Throw unimplemented.
[simgrid.git] / src / bindings / lua / lua_utils.c
index 24bd4ab..444f15d 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010. The SimGrid Team.
+/* Copyright (c) 2010-2012. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -103,7 +103,8 @@ const char* sglua_get_spaces(int length) {
 
   static char spaces[128];
 
-  xbt_assert(length < 128);
+  xbt_assert(length >= 0 && length < 128,
+      "Invalid indentation length: %d", length);
   if (length != 0) {
     memset(spaces, ' ', length);
   }