there's no need to copy the string byte by byte, use snprintf instead
authortsauerbeck <tsauerbeck>
Fri, 29 Oct 2004 13:50:27 +0000 (13:50 +0000)
committertsauerbeck <tsauerbeck@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Fri, 29 Oct 2004 13:50:27 +0000 (13:50 +0000)
SVN revision: 12053

legacy/edje/data/src/test.edc

index 09b4a17..78c6f70 100644 (file)
@@ -80,11 +80,7 @@ collections
                       new buf[100];
                       
                       snprintf(buf, sizeof(buf), "MESSAGE STRING ID: %i", id);
-                      for (new j = 0; j < (sizeof(str) - 1); j++)
-                        {
-                           str[j] = getarg(2, j);
-                           if (str[j] == 0) break;
-                        }
+                      snprintf(str, 100, "%s", getarg(2));
                       emit(buf, str);
                    }
                  else if (type == MSG_INT_SET)