From 3d5f479f878d0d2b85fb03f30971a58c2541ab54 Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Wed, 4 Feb 1998 09:56:06 -0500 Subject: [svn-r217] Fixed fence-post & memory copy errors in H5F_encode_length_unusual() --- src/H5F.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/H5F.c b/src/H5F.c index d6098fc..bcd8bb2 100644 --- a/src/H5F.c +++ b/src/H5F.c @@ -177,7 +177,7 @@ H5F_term_interface(void) void H5F_encode_length_unusual(const H5F_t *f, uint8 **p, uint8 *l) { - intn i = H5F_SIZEOF_SIZE(f); + intn i = (intn)H5F_SIZEOF_SIZE(f)-1; #ifdef WORDS_BIGENDIAN /* @@ -187,8 +187,8 @@ H5F_encode_length_unusual(const H5F_t *f, uint8 **p, uint8 *l) *(*p) = *(l + i); #else /* platform has little-endian integers */ - for (; i >= 0; i--, (*p)++) - *(*p) = *l; + HDmemcpy(*p,l,i+1); + *p+=(i+1); #endif #ifdef LATER -- cgit v0.12