File 1419-fix-handle-tokenizer-error-in-config-file.patch of Package erlang

From 41bc991392858ea6e2734202a0764e2c0b5ca258 Mon Sep 17 00:00:00 2001
From: Marko Mindek <marko.mindek@gmail.com>
Date: Sun, 5 Oct 2025 13:31:01 +0200
Subject: [PATCH] fix: handle tokenizer error in config file

---
 lib/kernel/src/application_controller.erl | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/kernel/src/application_controller.erl b/lib/kernel/src/application_controller.erl
index 5b94880eec..9fcf0ecd8e 100644
--- a/lib/kernel/src/application_controller.erl
+++ b/lib/kernel/src/application_controller.erl
@@ -558,7 +558,7 @@ init(Init, Kernel) ->
 	    ReasonStr =
 		lists:flatten(io_lib:format("error in config file "
 					    "~tp (~w): ~ts",
-					    [File, Line, Str])),
+					    [File, Line, to_string(Str)])),
 	    Init ! {ack, self(), {error, to_string(ReasonStr)}};
         {error, {file_descriptor, FDString, Line, Str}} ->
 	    ReasonStr =
@@ -2035,8 +2035,8 @@ scan_file(Str) ->
 		Error ->
 		    Error
 	    end;
-	{done, Result, _} ->
-	    {error, {none, parse_file, tuple_to_list(Result)}};
+	{done, {error, {Line, Module, Description}, _}, _} ->
+	    {error, {Line, parse_file, {Module, Description}}};
 	{more, _} ->
 	    {error, {none, load_file, "no ending <dot> found"}}
     end.
-- 
2.51.0

openSUSE Build Service is sponsored by