From 3dc84af7a1f3544d04122a20800671914d9000a1 Mon Sep 17 00:00:00 2001 From: Joe Neeman Date: Thu, 19 Dec 2024 18:18:25 +0700 Subject: [PATCH] Backport nls crash fix --- core/src/files.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/files.rs b/core/src/files.rs index be132327da..a752d67a51 100644 --- a/core/src/files.rs +++ b/core/src/files.rs @@ -117,7 +117,7 @@ impl Files { // This implementation would be a little nicer if `Vector` supported mutable access. // unwrap: we're allowed to panic if file_id is invalid let mut old = self.get(file_id).unwrap().clone(); - old.source = source.into(); + old = File::new(old.name, source); self.files.set(file_id.0 as usize, old); }