shithub: riscv

Download patch

ref: 25139465363b2230b69789013e3e0b5f82d76564
parent: 953387d7ba137ebd25a120e2ce2fd1a61f2d455d
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Mon Aug 3 13:29:30 EDT 2015

crop: use strtol() instead of atoi()

--- a/sys/src/cmd/crop.c
+++ b/sys/src/cmd/crop.c
@@ -27,11 +27,7 @@
 {
 	if(s == nil)
 		usage();
-	if(*s == '+')
-		return atoi(s+1);
-	if(*s == '-')
-		return -atoi(s+1);
-	return atoi(s);
+	return strtol(s, 0, 0);
 }
 
 Rectangle