From 234938349c8d2b58d69ebc47ca60e70ca7dd1d99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20L=C3=BChne?= Date: Wed, 22 Jun 2016 08:59:18 +0100 Subject: [PATCH] Fixed incorrect seek positions. --- include/plasp/LanguageDetection.h | 2 +- src/plasp/utils/Parser.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/plasp/LanguageDetection.h b/include/plasp/LanguageDetection.h index 4dd6c9e..39c9df5 100644 --- a/include/plasp/LanguageDetection.h +++ b/include/plasp/LanguageDetection.h @@ -21,7 +21,7 @@ Language::Type detectLanguage(utils::Parser &parser) // SAS begins with "begin_version" if (parser.probe("begin")) { - parser.seek(std::ios::beg); + parser.seek(0); return Language::Type::SAS; } diff --git a/src/plasp/utils/Parser.cpp b/src/plasp/utils/Parser.cpp index a543c7a..daf51bf 100644 --- a/src/plasp/utils/Parser.cpp +++ b/src/plasp/utils/Parser.cpp @@ -91,7 +91,7 @@ void Parser::readFile(const boost::filesystem::path &path) void Parser::reset() { m_stream.clear(); - seek(std::ios::beg); + seek(0); } ////////////////////////////////////////////////////////////////////////////////////////////////////