]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Issue #837: Fix iteration over the available error codes
authorTim Kientzle <kientzle@gmail.com>
Fri, 9 Dec 2016 05:56:34 +0000 (21:56 -0800)
committerTim Kientzle <kientzle@gmail.com>
Fri, 9 Dec 2016 05:56:34 +0000 (21:56 -0800)
libarchive/archive_windows.c

index d53906324f7fe7a969001c3dfcbd384769fe1ed9..8663bef242248119d2b3ec8ff3eb54266276921e 100644 (file)
@@ -891,7 +891,7 @@ __la_dosmaperr(unsigned long e)
                return;
        }
 
-       for (i = 0; i < (int)sizeof(doserrors); i++)
+       for (i = 0; i < (int)sizeof(doserrors)/sizeof(doserrors[0]); i++)
        {
                if (doserrors[i].winerr == e)
                {