tracker r2820 - in trunk: . src/tracker-extract



Author: mottela
Date: Wed Jan 21 21:16:16 2009
New Revision: 2820
URL: http://svn.gnome.org/viewvc/tracker?rev=2820&view=rev

Log:
A bugfix to tiff ascii field handling

Modified:
   trunk/ChangeLog
   trunk/src/tracker-extract/tracker-extract-tiff.c

Modified: trunk/src/tracker-extract/tracker-extract-tiff.c
==============================================================================
--- trunk/src/tracker-extract/tracker-extract-tiff.c	(original)
+++ trunk/src/tracker-extract/tracker-extract-tiff.c	Wed Jan 21 21:16:16 2009
@@ -113,6 +113,7 @@
 	TiffTag *tag;
 
 	gchar buffer[1024];
+	gchar *text;
 	guint16 varui16 = 0;
 	guint32 varui32 = 0;
 	
@@ -147,9 +148,11 @@
 			for (tag = exiftags; tag->name; ++tag) {
 				switch (tag->type) {
 				case TIFF_TAGTYPE_STRING:
-					if (!TIFFGetField (image, tag->tag, &buffer)) {
+					if (!TIFFGetField (image, tag->tag, &text)) {
 						continue;
 					}
+
+					sprintf (buffer,"%s",text);
 					break;
 				case TIFF_TAGTYPE_UINT16:						
 					if (!TIFFGetField (image, tag->tag, &varui16)) {
@@ -203,9 +206,11 @@
 	for (tag = tags; tag->name; ++tag) {
 		switch (tag->type) {
 			case TIFF_TAGTYPE_STRING:
-				if (!TIFFGetField (image, tag->tag, &buffer)) {
+				if (!TIFFGetField (image, tag->tag, &text)) {
 					continue;
 				}
+
+				sprintf (buffer,"%s", text);
 				break;
 			case TIFF_TAGTYPE_UINT16:
 				if (!TIFFGetField (image, tag->tag, &varui16)) {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]