Ticket #2: 0001-fixed-multidimentional-csv-export.patch

File 0001-fixed-multidimentional-csv-export.patch, 785 bytes (added by cj, 15 years ago)
  • conversion/csv.cc

    From 96160b88cd343f823bea25d06cba9a615fe01589 Mon Sep 17 00:00:00 2001
    From: Constantin <jucovschi@gmail.com>
    Date: Wed, 24 Mar 2010 18:32:59 +0100
    Subject: [PATCH] fixed multidimentional csv export.
    
    ---
     conversion/csv.cc |    2 +-
     1 files changed, 1 insertions(+), 1 deletions(-)
    
    diff --git a/conversion/csv.cc b/conversion/csv.cc
    index 5e3d281..9771873 100644
    a b void r_Conv_CSV::print(std::ofstream &f, baseType* val, int *dims, int dim) {  
    108108      f << (castType)val[0] << ",";
    109109    f << (castType) val[0]; val++;
    110110  } else {
    111     for (int i=0; i<dims[0]-1; ++i, val++) {
     111    for (int i=0; i<dims[0]-1; ++i) {
    112112      f << "{";
    113113      print<baseType, castType>(f, val, dims+1, dim-1);
    114114      f << "},";