[Debootloaders-devel] r152 - in trunk/rsrce: . debian

Jeremie Koenig jkoenig-guest at costa.debian.org
Wed Jul 26 00:57:55 UTC 2006


Author: jkoenig-guest
Date: 2006-07-26 00:57:55 +0000 (Wed, 26 Jul 2006)
New Revision: 152

Modified:
   trunk/rsrce/debian/changelog
   trunk/rsrce/resource.c
Log:
Fix bad usage of htons() which prevented reading files on big-endian
architectures, diagnosis and patch by Piotr Krysiuk.


Modified: trunk/rsrce/debian/changelog
===================================================================
--- trunk/rsrce/debian/changelog	2006-07-25 22:05:27 UTC (rev 151)
+++ trunk/rsrce/debian/changelog	2006-07-26 00:57:55 UTC (rev 152)
@@ -2,8 +2,10 @@
 
   * Fix rsrce manpage section.
   * Add some command line options to allow for '#!/usr/bin/rsrce -ef' scripts.
+  * A bug prevented file to be read on big-endian architectures; fix provided
+    by Piotr Krysiuk.
 
- -- Jeremie Koenig <sprite at sprite.fr.eu.org>  Sat, 15 Jul 2006 18:26:47 +0200
+ -- Jeremie Koenig <sprite at sprite.fr.eu.org>  Wed, 26 Jul 2006 02:47:35 +0200
 
 rsrce (0.2.1) unstable; urgency=low
 

Modified: trunk/rsrce/resource.c
===================================================================
--- trunk/rsrce/resource.c	2006-07-25 22:05:27 UTC (rev 151)
+++ trunk/rsrce/resource.c	2006-07-26 00:57:55 UTC (rev 152)
@@ -293,7 +293,7 @@
 		r = res_new(c->f, t->type, ntohs(ref[i].id));
 		r->attr = ref[i].attr;
 		
-		if(ref[i].nameofs != htons(-1)) {
+		if(ntohs(ref[i].nameofs) != 0xffff) {
 			name = (struct resname *)
 				(c->nbase + ntohs(ref[i].nameofs));
 			CHECKPTR(name, "name");





More information about the Debootloaders-devel mailing list