Control: tags 811612 +fixed-upstream
Control: tags 811612 +patch

On Wed, Jan 20, 2016 at 11:14:09PM +0100, Lennart Weller wrote:
> On 20.01.2016 18:30, Martin Michlmayr wrote
> > This builds fine.
> Nice. So I either just have to add the patches for 2.0.8 or get 0ad to work
> with 2.1.0. I'll look into that in the next few days as time permits.
>...

This bug is the reason why 0ad is not in testing, and if it doesn't get 
fixed then 0ad will not be in the next Debian stable. 

I've attached the trivial fix.

> Lennart

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed

Description: Fix building with gcc 6

--- nvidia-texture-tools-2.0.8-1+dfsg.orig/src/nvimage/ImageIO.cpp
+++ nvidia-texture-tools-2.0.8-1+dfsg/src/nvimage/ImageIO.cpp
@@ -135,7 +135,7 @@ FloatImage * nv::ImageIO::loadFloat(cons
 	StdInputStream stream(fileName);
 	
 	if (stream.isError()) {
-		return false;
+		return NULL;
 	}
 	
 	return loadFloat(fileName, stream);
@@ -233,7 +233,7 @@ Image * nv::ImageIO::loadTGA(Stream & s)
 		case TGA_TYPE_INDEXED:
 			if( tga.colormap_type!=1 || tga.colormap_size!=24 || tga.colormap_length>256 ) {
 				nvDebug( "*** ImageIO::loadTGA: Error, only 24bit paletted images are supported.\n" );
-				return false;
+				return NULL;
 			}
 			pal = true;
 			break;
@@ -254,7 +254,7 @@ Image * nv::ImageIO::loadTGA(Stream & s)
 
 		default:
 			nvDebug( "*** ImageIO::loadTGA: Error, unsupported image type.\n" );
-			return false;
+			return NULL;
 	}
 
 	const uint pixel_size = (tga.pixel_size/8);
@@ -621,7 +621,7 @@ Image * nv::ImageIO::loadPNG(Stream & s)
 	png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
 	if (png_ptr == NULL) {
 	//	nvDebug( "*** LoadPNG: Error allocating read buffer in file '%s'.\n", name );
-		return false;
+		return NULL;
 	}
 
 	// Allocate/initialize a memory block for the image information
@@ -629,14 +629,14 @@ Image * nv::ImageIO::loadPNG(Stream & s)
 	if (info_ptr == NULL) {
 		png_destroy_read_struct(&png_ptr, NULL, NULL);
 	//	nvDebug( "*** LoadPNG: Error allocating image information for '%s'.\n", name );
-		return false;
+		return NULL;
 	}
 
 	// Set up the error handling
 	if (setjmp(png_jmpbuf(png_ptr))) {
 		png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
 	//	nvDebug( "*** LoadPNG: Error reading png file '%s'.\n", name );
-		return false;
+		return NULL;
 	}
 
 	// Set up the I/O functions.

Reply via email to