shithub: sl

Download patch

ref: b01103259d5100e60980475adac5cd8eba96fa82
parent: 7b4d9dc5a87aa8d41899f39cc0296eea858cbcc1
author: Sigrid Solveig Haflínudóttir <sigrid@ftrv.se>
date: Tue Dec 31 23:46:12 EST 2024

print_iostream: fix wrong filename

--- a/iostream.c
+++ b/iostream.c
@@ -8,11 +8,11 @@
 static void
 print_iostream(value_t v, ios_t *f)
 {
-	USED(v);
+	ios_t *s = value2c(ios_t*, v);
 	fl_print_str(f, "#<io stream");
-	if(*f->loc.filename){
+	if(*s->loc.filename){
 		fl_print_chr(f, ' ');
-		fl_print_str(f, f->loc.filename);
+		fl_print_str(f, s->loc.filename);
 	}
 	fl_print_chr(f, '>');
 }