shithub: riscv

Download patch

ref: a4fbbc0cfc82d94ab6a079a77841a965f9c6db73
parent: 24d7f981ec545afb9e78152a717a550a4498edf7
author: ment <[email protected]>
date: Sun May 8 10:34:12 EDT 2011

disk/partfs: fixed sparse partition table bug

--- a/sys/src/cmd/disk/partfs.c
+++ b/sys/src/cmd/disk/partfs.c
@@ -235,7 +235,7 @@
 	for(p = tab; p < tab + nelem(tab); p++, n++){
 		if(!p->inuse)
 			continue;
-		if(n == off){
+		if(off-- == 0){
 			d->name = estrdup9p(p->name);
 			d->length = p->length*sectsize;
 			d->mode = p->mode;