From c277853af3c76dd3498c0a09f8d1f994a438b5c4 Mon Sep 17 00:00:00 2001 From: Wei-keng Liao Date: Thu, 6 Oct 2016 00:39:16 -0500 Subject: [PATCH] use ncx_get_uint64 instead of ncx_get_int64 --- libsrc/nc3internal.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libsrc/nc3internal.c b/libsrc/nc3internal.c index 13e83ced4..5ff42fc48 100644 --- a/libsrc/nc3internal.c +++ b/libsrc/nc3internal.c @@ -351,9 +351,9 @@ read_numrecs(NC3_INFO *ncp) return status; if (fIsSet(ncp->flags, NC_64BIT_DATA)) { - long long tmp=0; - status = ncx_get_int64(&xp, &tmp); - new_nrecs = tmp; + unsigned long long tmp=0; + status = ncx_get_uint64(&xp, &tmp); + new_nrecs = (size_t)tmp; } else status = ncx_get_size_t(&xp, &new_nrecs); @@ -394,7 +394,7 @@ write_numrecs(NC3_INFO *ncp) { const size_t nrecs = NC_get_numrecs(ncp); if (fIsSet(ncp->flags, NC_64BIT_DATA)) - status = ncx_put_int64(&xp, nrecs); + status = ncx_put_uint64(&xp, (unsigned long long)nrecs); else status = ncx_put_size_t(&xp, &nrecs); }