comparison src/xs_length.c @ 777:15f0c8e11338

Increase line buffer size in songlength database reader. Fixes problems with extremely long entries.
author Matti Hamalainen <ccr@tnsp.org>
date Tue, 06 Nov 2012 12:11:32 +0200
parents 55eea3fa8868
children 54a7afbf251e
comparison
equal deleted inserted replaced
776:bb7b3ded919a 777:15f0c8e11338
192 /* Read database to memory 192 /* Read database to memory
193 */ 193 */
194 gint xs_sldb_read(XSSLDB *db, const gchar *dbFilename) 194 gint xs_sldb_read(XSSLDB *db, const gchar *dbFilename)
195 { 195 {
196 FILE *inFile; 196 FILE *inFile;
197 gchar inLine[XS_BUF_SIZE]; 197 gchar inLine[XS_BUF2_SIZE];
198 size_t lineNum; 198 size_t lineNum;
199 XSSLDBNode *tmnode; 199 XSSLDBNode *tmnode;
200 assert(db); 200 assert(db);
201 201
202 /* Try to open the file */ 202 /* Try to open the file */
206 } 206 }
207 207
208 /* Read and parse the data */ 208 /* Read and parse the data */
209 lineNum = 0; 209 lineNum = 0;
210 210
211 while (fgets(inLine, XS_BUF_SIZE, inFile) != NULL) { 211 while (fgets(inLine, XS_BUF2_SIZE, inFile) != NULL) {
212 size_t linePos = 0; 212 size_t linePos = 0;
213 lineNum++; 213 lineNum++;
214 214
215 xs_findnext(inLine, &linePos); 215 xs_findnext(inLine, &linePos);
216 216