diff options
author | Rodrigo Alejandro Melo <rodrigomelo9@gmail.com> | 2020-02-01 17:03:56 -0300 |
---|---|---|
committer | Rodrigo Alejandro Melo <rodrigomelo9@gmail.com> | 2020-02-01 17:03:56 -0300 |
commit | b4c30cfc8d49c9028b67f7ba5710ed959f6f8f57 (patch) | |
tree | 5289978482a9750dcd08cdfe96099a66c8bda1df /frontends | |
parent | d74b9604e332fc89bd314f6df0d909f91f0db04a (diff) | |
download | yosys-b4c30cfc8d49c9028b67f7ba5710ed959f6f8f57.tar.gz yosys-b4c30cfc8d49c9028b67f7ba5710ed959f6f8f57.tar.bz2 yosys-b4c30cfc8d49c9028b67f7ba5710ed959f6f8f57.zip |
Fixed a bug in the new feature of $readmem[hb] when an empty string is provided
Signed-off-by: Rodrigo Alejandro Melo <rodrigomelo9@gmail.com>
Diffstat (limited to 'frontends')
-rw-r--r-- | frontends/ast/simplify.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/frontends/ast/simplify.cc b/frontends/ast/simplify.cc index 4f105eed6..310f6fc32 100644 --- a/frontends/ast/simplify.cc +++ b/frontends/ast/simplify.cc @@ -2894,7 +2894,7 @@ AstNode *AstNode::readmem(bool is_readmemh, std::string mem_filename, AstNode *m } else { yosys_input_files.insert(mem_filename); } - if (f.fail()) + if (f.fail() || strlen(mem_filename.c_str()) == 0) log_file_error(filename, linenum, "Can not open file `%s` for %s.\n", mem_filename.c_str(), str.c_str()); log_assert(GetSize(memory->children) == 2 && memory->children[1]->type == AST_RANGE && memory->children[1]->range_valid); |