server: Don't fail to map a shared section if the final sector is truncated.
diff --git a/server/mapping.c b/server/mapping.c
index c7eb075..fe99879 100644
--- a/server/mapping.c
+++ b/server/mapping.c
@@ -184,6 +184,11 @@
         while (toread)
         {
             long res = pread( fd, buffer + file_size - toread, toread, read_pos );
+            if (!res && toread < 0x200)  /* partial sector at EOF is not an error */
+            {
+                file_size -= toread;
+                break;
+            }
             if (res <= 0) goto error;
             toread -= res;
             read_pos += res;