shithub: mc

Download patch

ref: 857f6990c4a840a8ab4808962b9680d8057f14d7
parent: 49fcb8a106211d40ee2e94a52a82fbee99cc37e9
author: Ori Bernstein <[email protected]>
date: Fri Oct 12 15:39:18 EDT 2012

Don't try to assign a byte to a slice.

--- a/libstd/option.myr
+++ b/libstd/option.myr
@@ -10,7 +10,7 @@
 
 		/* state */
 		optidx	: size
-		curopt	: byte[:]
+		curarg	: byte[:]
 		args	: byte[:][:]
 	;;
 
@@ -33,12 +33,12 @@
 const optnext = {ctx
 	var c
 
-	if !ctx.curopt.len
+	if !ctx.curarg.len
 		if !nextopt(ctx)
 			-> Badchar
 		;;
 	;;
-	(c, ctx.curopt) = striter(ctx.curopt)
+	(c, ctx.curarg) = striter(ctx.curarg)
 	-> c
 }
 
@@ -56,6 +56,6 @@
 	-> false
 :foundopt
 	ctx.optidx = i
-	ctx.curopt = ctx.opts[i]
+	ctx.curarg = ctx.args[i]
 	-> true
 }