From e59de739486e9673e459767d9711af0e8d87fe79 Mon Sep 17 00:00:00 2001 From: Wojciech Figat Date: Tue, 2 Aug 2022 16:53:31 +0200 Subject: [PATCH] Fix small issues --- Source/Engine/Render2D/Font.cpp | 2 +- Source/Tools/Flax.Build/Bindings/BindingsGenerator.Api.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Engine/Render2D/Font.cpp b/Source/Engine/Render2D/Font.cpp index b50a3b1c2..cbc40a227 100644 --- a/Source/Engine/Render2D/Font.cpp +++ b/Source/Engine/Render2D/Font.cpp @@ -231,7 +231,7 @@ void Font::ProcessText(const StringView& text, Array& outputLines lastMoveLine = moveLine; } - if (tmpLine.LastCharIndex >= tmpLine.FirstCharIndex || text[textLength - 1] == '\n') + if (textLength != 0 && (tmpLine.LastCharIndex >= tmpLine.FirstCharIndex || text[textLength - 1] == '\n')) { // Add line tmpLine.Size.X = cursorX; diff --git a/Source/Tools/Flax.Build/Bindings/BindingsGenerator.Api.cs b/Source/Tools/Flax.Build/Bindings/BindingsGenerator.Api.cs index e8f98d401..a5cf4e8c6 100644 --- a/Source/Tools/Flax.Build/Bindings/BindingsGenerator.Api.cs +++ b/Source/Tools/Flax.Build/Bindings/BindingsGenerator.Api.cs @@ -238,7 +238,7 @@ namespace Flax.Build.Bindings result = FindApiTypeInfoInner(buildData, typeInfo, e.Value); if (result != null) { - buildData.TypeCache.Add(typeInfo, result); + buildData.TypeCache[typeInfo] = result; return result; } }