Project

General

Profile

Actions

Bug #2676

closed
WD

Double unget is not guaranteed to work

Bug #2676: Double unget is not guaranteed to work

Added by Anonymous over 12 years ago. Updated over 12 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Start date:
02/14/2014
Due date:
% Done:

0%

Estimated time:

Description

WMessageResources::readResourceStream does s.unget twice if the stream doesn't have UTF16 BOM. Since unget is not guaranteed to work more than once, this is a possible bug (depending on implementation and underlying stream type). The simple solution is to s.seekg(0, std::ios::beg); instead, since that is what the code attempts to do anyway.

WD Updated by Wim Dumon over 12 years ago Actions #1

  • Status changed from New to Resolved
  • Assignee set to Wim Dumon

KD Updated by Koen Deforche over 12 years ago Actions #2

  • Status changed from Resolved to Closed
Actions

Also available in: PDF Atom