Fix wrong strncpy usage
[platform/upstream/at-spi2-core.git] / test / at_spi2_tool.c
index e9b3d68..95c726c 100644 (file)
@@ -341,7 +341,7 @@ static void _test_atspi_parent_child_relation(AtspiAccessible *obj, AtspiAccessi
                char parent_status[NUMBER_WIDTH];
 
                if (parent == NULL)
-                       strncpy(parent_status, NUMBER_WIDTH, "_");
+                       strncpy(parent_status, "_", NUMBER_WIDTH);
                else
                        snprintf(parent_status, NUMBER_WIDTH, "%d", parent_index);