diff options
| author | Eugen Wissner <belka@caraus.de> | 2026-07-13 02:49:24 +0200 |
|---|---|---|
| committer | Eugen Wissner <belka@caraus.de> | 2026-07-13 02:49:24 +0200 |
| commit | 97741a01323021ccec8b0b60c6f8318c88ac373a (patch) | |
| tree | 51cd1722073498a749f158b9a6dc998fb4846055 /source/common.elna | |
| parent | b2f8be605d2b79d1d4b1995646e7058bec299a22 (diff) | |
| download | elna-97741a01323021ccec8b0b60c6f8318c88ac373a.tar.gz | |
Fix ICE substracting pointers
Diffstat (limited to 'source/common.elna')
| -rw-r--r-- | source/common.elna | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/source/common.elna b/source/common.elna index 8bba90f..9e6a314 100644 --- a/source/common.elna +++ b/source/common.elna @@ -78,4 +78,17 @@ begin return nil end +(* Returns true or false depending whether two strings are equal. *) +proc string_compare*(lhs_pointer: ^Char; lhs_length: Word; rhs_pointer: String): Bool +var + result: Bool +begin + if lhs_length = rhs_pointer.length then + result := memcmp(lhs_pointer, rhs_pointer.ptr, lhs_length) = 0 + else + result := false + end; + return result +end + end. |
