From 74961f34a44cabae414e84537e8baae0ecb373c9 Mon Sep 17 00:00:00 2001 From: SMerrony Date: Sun, 29 May 2022 10:41:36 +0200 Subject: [PATCH] Fix bug where some undisplayable characters from the host caused a hang. --- Src/display_p.ads | 2 +- Src/gui.ads | 2 +- Src/terminal.adb | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Src/display_p.ads b/Src/display_p.ads index 90827fb..67a863a 100644 --- a/Src/display_p.ads +++ b/Src/display_p.ads @@ -49,7 +49,7 @@ package Display_P is procedure Clear_Dirty; function Is_Dirty return Boolean; procedure Init; - procedure Get_Cell (Line, Col : in N atural; Value : out Character; Blnk, Dm, Rv, Under, Prot : out Boolean); + procedure Get_Cell (Line, Col : in Natural; Value : out Character; Blnk, Dm, Rv, Under, Prot : out Boolean); procedure Clear_Cell (Line, Col : in Natural); procedure Clear_Unprotected_Cell (Line, Col : in Natural); procedure Clear_Line (Line : in Integer); diff --git a/Src/gui.ads b/Src/gui.ads index d3b3acb..0f7b0ca 100644 --- a/Src/gui.ads +++ b/Src/gui.ads @@ -41,7 +41,7 @@ package GUI is package Handlers is new Gtk.Handlers.Callback (Widget_Type => Gtk.Widget.Gtk_Widget_Record); package SB_Timeout_P is new Glib.Main.Generic_Sources (Gtk.Box.Gtk_Box); - App_SemVer : constant String := "v0.11.4"; -- TODO Update Version each release! + App_SemVer : constant String := "v0.11.5"; -- TODO Update Version each release! App_Title : constant String := "DasherA"; App_Comment : constant String := "A Data General DASHER terminal emulator"; App_Author : constant String := "Stephen Merrony"; diff --git a/Src/terminal.adb b/Src/terminal.adb index 582d479..4c4050d 100644 --- a/Src/terminal.adb +++ b/Src/terminal.adb @@ -19,6 +19,7 @@ with Ada.Characters.Latin_1; with Ada.Strings.Fixed; +-- with Ada.Text_IO; with Gdk.Main; with Glib.Main; @@ -456,7 +457,7 @@ package body Terminal is -- Finally! Put the character in the displayable matrix C := Character'Val(127); -- the 'unknown character' character - if BDF_Font.Font.Is_Loaded(B_Int) then + if B_Int < 128 and then BDF_Font.Font.Is_Loaded(B_Int) then C := B; end if;