diff options
-rw-r--r-- | src/cache.h | 1 | ||||
-rw-r--r-- | src/csvreader.cpp | 11 |
2 files changed, 11 insertions, 1 deletions
diff --git a/src/cache.h b/src/cache.h index 7b82541..987443c 100644 --- a/src/cache.h +++ b/src/cache.h | |||
@@ -193,6 +193,7 @@ namespace Bu | |||
193 | typedef Bu::Hash<keytype, CacheEntry> CidHash; | 193 | typedef Bu::Hash<keytype, CacheEntry> CidHash; |
194 | 194 | ||
195 | public: | 195 | public: |
196 | typedef keytype Key; | ||
196 | Cache( Calc *pCalc, Store *pStore ) : | 197 | Cache( Calc *pCalc, Store *pStore ) : |
197 | pCalc( pCalc ), | 198 | pCalc( pCalc ), |
198 | pStore( pStore ) | 199 | pStore( pStore ) |
diff --git a/src/csvreader.cpp b/src/csvreader.cpp index c63fe06..ef7a326 100644 --- a/src/csvreader.cpp +++ b/src/csvreader.cpp | |||
@@ -43,6 +43,9 @@ Bu::StrArray Bu::CsvReader::readLine() | |||
43 | 43 | ||
44 | Bu::FString sLine = sIn.readLine(); | 44 | Bu::FString sLine = sIn.readLine(); |
45 | 45 | ||
46 | if( !sLine.isSet() ) | ||
47 | return Bu::StrArray(); | ||
48 | |||
46 | Bu::FString::iterator i = sLine.begin(); | 49 | Bu::FString::iterator i = sLine.begin(); |
47 | 50 | ||
48 | aVals.append( sDecode( i ) ); | 51 | aVals.append( sDecode( i ) ); |
@@ -52,6 +55,8 @@ Bu::StrArray Bu::CsvReader::readLine() | |||
52 | if( *i == ',' ) | 55 | if( *i == ',' ) |
53 | { | 56 | { |
54 | i++; | 57 | i++; |
58 | if( !i ) | ||
59 | break; | ||
55 | aVals.append( sDecode( i ) ); | 60 | aVals.append( sDecode( i ) ); |
56 | } | 61 | } |
57 | else | 62 | else |
@@ -81,7 +86,11 @@ Bu::FString Bu::CsvReader::decodeExcel( Bu::FString::iterator &i ) | |||
81 | if( *i == '\"' ) | 86 | if( *i == '\"' ) |
82 | { | 87 | { |
83 | i++; | 88 | i++; |
84 | if( *i == '\"' ) | 89 | if( !i ) |
90 | { | ||
91 | return sRet; | ||
92 | } | ||
93 | else if( *i == '\"' ) | ||
85 | { | 94 | { |
86 | sRet += *i; | 95 | sRet += *i; |
87 | } | 96 | } |