aboutsummaryrefslogtreecommitdiffstats
path: root/backends
diff options
context:
space:
mode:
authorMiodrag Milanovic <mmicko@gmail.com>2022-08-09 12:45:32 +0200
committerMiodrag Milanovic <mmicko@gmail.com>2022-08-09 12:45:32 +0200
commit99f1c71582bce51aab25b3a50b15eec002545ef4 (patch)
treef7f66d90e128bdccc82dada0ec73cfa2f5fdc4a8 /backends
parentd2b4246a6d5b7b0a30ea7df23a6d06f0846b0304 (diff)
downloadyosys-99f1c71582bce51aab25b3a50b15eec002545ef4.tar.gz
yosys-99f1c71582bce51aab25b3a50b15eec002545ef4.tar.bz2
yosys-99f1c71582bce51aab25b3a50b15eec002545ef4.zip
properly encode string in rtlil
Diffstat (limited to 'backends')
-rw-r--r--backends/rtlil/rtlil_backend.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/backends/rtlil/rtlil_backend.cc b/backends/rtlil/rtlil_backend.cc
index 1b11de5ec..b5163aefe 100644
--- a/backends/rtlil/rtlil_backend.cc
+++ b/backends/rtlil/rtlil_backend.cc
@@ -75,7 +75,7 @@ void RTLIL_BACKEND::dump_const(std::ostream &f, const RTLIL::Const &data, int wi
else if (str[i] == '\t')
f << stringf("\\t");
else if (str[i] < 32)
- f << stringf("\\%03o", str[i]);
+ f << stringf("\\%03o", (unsigned char)str[i]);
else if (str[i] == '"')
f << stringf("\\\"");
else if (str[i] == '\\')