From a1aa25afa0e607a803d3d91a0aa67bb06b2c608f Mon Sep 17 00:00:00 2001 From: Alexey Andreev Date: Mon, 13 May 2019 10:49:36 +0300 Subject: [PATCH] C: fix generation of relative path in 'include' directive --- .../main/java/org/teavm/backend/c/generate/IncludeManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/java/org/teavm/backend/c/generate/IncludeManager.java b/core/src/main/java/org/teavm/backend/c/generate/IncludeManager.java index 63068b8a3..2d2f6b4b9 100644 --- a/core/src/main/java/org/teavm/backend/c/generate/IncludeManager.java +++ b/core/src/main/java/org/teavm/backend/c/generate/IncludeManager.java @@ -39,7 +39,7 @@ public abstract class IncludeManager { while (true) { int next = fileName.indexOf('/', commonIndex); if (next < 0 || next > currentFileName.length() - || !currentFileName.regionMatches(commonIndex, fileName, commonIndex, next - commonIndex)) { + || !currentFileName.regionMatches(commonIndex, fileName, commonIndex, next - commonIndex + 1)) { break; } commonIndex = next + 1;