[encodump] Fix a bug not generating comma (#2421)
author박천교/동작제어Lab(SR)/Engineer/삼성전자 <ch.bahk@samsung.com>
Fri, 30 Nov 2018 04:35:08 +0000 (13:35 +0900)
committer박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 <jh1302.park@samsung.com>
Fri, 30 Nov 2018 04:35:08 +0000 (13:35 +0900)
Now generating comma separated list output for size more than 1.

Signed-off-by: Cheongyo Bahk <ch.bahk@samsung.com>
contrib/encodump/src/Dump.cpp

index ec5402e..27972d6 100644 (file)
@@ -203,7 +203,7 @@ void dump(std::string header, SetT set, EntityF print_addr_f)
     int idx = 0;
     for (auto entity : *set)
     {
-      if (idx != 0)
+      if (idx++ != 0)
         std::cout << ", ";
       print_addr_f(entity);
     }