diff options
| author | gingerBill <bill@gingerbill.org> | 2018-08-05 19:07:03 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2018-08-05 19:07:03 +0100 |
| commit | d8e5b2d1a4ae582f9f0436358c55866aeb1776a5 (patch) | |
| tree | 948026feb971a362cff4789cc6208e1fac76a487 /src/check_expr.cpp | |
| parent | 2d26ad022656218b8002b97063ff44a9133ceccc (diff) | |
Fix cstring cast operation
Diffstat (limited to 'src/check_expr.cpp')
| -rw-r--r-- | src/check_expr.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/check_expr.cpp b/src/check_expr.cpp index 163d7f6d0..029d4562c 100644 --- a/src/check_expr.cpp +++ b/src/check_expr.cpp @@ -1855,7 +1855,7 @@ bool check_is_castable_to(CheckerContext *c, Operand *operand, Type *y) { // } } // cstring -> string - if (src == t_cstring && dst == t_string) { + if (are_types_identical(src, t_cstring) && are_types_identical(dst, t_string)) { if (operand->mode != Addressing_Constant) { add_package_dependency(c, "runtime", "__cstring_to_string"); } |