diff options
| -rw-r--r-- | oop2eindopdr/ZipExport.cpp | 5 | 
1 files changed, 4 insertions, 1 deletions
diff --git a/oop2eindopdr/ZipExport.cpp b/oop2eindopdr/ZipExport.cpp index 35c670f..eb0d60f 100644 --- a/oop2eindopdr/ZipExport.cpp +++ b/oop2eindopdr/ZipExport.cpp @@ -36,7 +36,10 @@ void ZipExport::export_zip(std::string filename) {  		}  		card->fetch_market_value(); -		csv_content.append(card->id + "," + std::to_string(card->value) + "\n"); +		char* value_str; +		asprintf(&value_str, "%.2f", card->value); +		csv_content.append(card->id + "," + std::string(value_str) + "\n"); +		free(value_str);  		zip_source* image = zip_source_file(zip, card->image_location_hires().c_str(), 0, 0);  		zip_file_add(zip, std::string(card->id + ".png").c_str(), image, 0);  |