diff --git a/ion/src/simulator/shared/state_file.cpp b/ion/src/simulator/shared/state_file.cpp index d51fde9a7..509c452cd 100644 --- a/ion/src/simulator/shared/state_file.cpp +++ b/ion/src/simulator/shared/state_file.cpp @@ -48,7 +48,12 @@ static inline bool load(FILE * f) { } void load(const char * filename) { - FILE * f = fopen(filename, "rb"); + FILE * f = nullptr; + if (strcmp(filename, "-") == 0) { + f = stdin; + } else { + f = fopen(filename, "rb"); + } if (f == nullptr) { return; }