Introduction
Introduction Statistics Contact Development Disclaimer Help
fix bug in crop-to-visualbox - gramscii - A simple editor for ASCII box-and-arr…
Log
Files
Refs
Tags
README
LICENSE
---
commit a9200ba6cceac59793c5460b4e653f4b7f43fb4c
parent 205161a025d4a955f79fdf3844a42c2c0da20e67
Author: KatolaZ <[email protected]>
Date: Fri, 9 Aug 2019 07:31:19 +0100
fix bug in crop-to-visualbox
Diffstat:
M screen.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/screen.c b/screen.c
@@ -476,7 +476,8 @@ void crop_to_rect(int x1, int y1, int x2, int y2){
for (i=0; i<= y2-y1; i ++){
ensure_line_length(&(screen.l[i]), screen.l[i+y1].lst+1);
sprintf(screen.l[i].s, "%s", screen.l[i+y1].s + x1);
- screen.l[i].lst = screen.l[i+y1].lst - x1;
+ screen.l[i].lst = x2 - x1;
+ screen.l[i].s[screen.l[i].lst + 1] = '\0';
}
while (i< HEIGHT){
screen.l[i].lst = -1;
You are viewing proxied material from bitreich.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.