瀏覽代碼

oh wait it wasn't superfluous lol

Eric 11 年之前
父節點
當前提交
e977af6ddf
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      write.go

+ 1 - 1
write.go

@@ -16,7 +16,7 @@ func (r *Row) WriteStruct(e interface{}, cols int) int {
 	}
 	}
 
 
 	n := v.NumField() // number of fields in struct
 	n := v.NumField() // number of fields in struct
-	if cols < n {
+	if cols < n && cols > 0 {
 		n = cols
 		n = cols
 	}
 	}