diff --git a/Tools/StatePlot.hs b/Tools/StatePlot.hs
--- a/Tools/StatePlot.hs
+++ b/Tools/StatePlot.hs
@@ -175,7 +175,9 @@
   let parseTime s = fromMaybe (error $ "Invalid time: " ++ show s) . strptime (B.pack timeFormat) $ s
   let outPNG = getArg "o" "" args
   input <- B.getContents
-  let events = parse parseTime `map` B.lines input
+  let pruneLF b | not (B.null b) && (B.last b == '\r') = B.init b
+                | otherwise                            = b
+  let events = (parse parseTime . pruneLF) `map` B.lines input
   let cmpTracks = case getArg "sort" "time"  args of { "time" -> comparing time ; "name" -> comparing track }
   let expireTimeMs = read $ getArg "expire" "Infinity" args
   let phantomColor = case getArg "phantom" "" args of { "" -> Nothing; c -> Just c }
diff --git a/splot.cabal b/splot.cabal
--- a/splot.cabal
+++ b/splot.cabal
@@ -1,5 +1,5 @@
 Name: splot
-Version: 0.1.14
+Version: 0.1.15
 License: BSD3
 License-file: LICENSE
 Copyright: Eugene Kirpichov, 2010
