summaryrefslogtreecommitdiff
path: root/src/error.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-02-27 03:05:35 -0400
committerJohn Wiegley <johnw@newartisans.com>2009-02-27 03:05:35 -0400
commit501949a364d3a26418bd59957be4015207312191 (patch)
tree5119a3db89dcda4fe1b667a0d746ca68f4d19f2d /src/error.cc
parentc49b98fc4c307a2d08161cebafb348b935c6fcb5 (diff)
downloadfork-ledger-501949a364d3a26418bd59957be4015207312191.tar.gz
fork-ledger-501949a364d3a26418bd59957be4015207312191.tar.bz2
fork-ledger-501949a364d3a26418bd59957be4015207312191.zip
If an error occurred in /dev/stdin, don't fopen it
Diffstat (limited to 'src/error.cc')
-rw-r--r--src/error.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/error.cc b/src/error.cc
index 5a45318f..653980b4 100644
--- a/src/error.cc
+++ b/src/error.cc
@@ -83,7 +83,7 @@ string source_context(const path& file,
const string& prefix)
{
std::size_t len = end_pos - pos;
- if (! len)
+ if (! len || file == path("/dev/stdin"))
return _("<no source context>");
assert(len > 0);