0027676: Foundation Classes - define Standard_ExtCharacter, Standard_Utf16Char using...
[occt.git] / src / FSD / FSD_File.cxx
index e5f1785..9fb391e 100644 (file)
@@ -443,7 +443,7 @@ Storage_BaseDriver& FSD_File::PutCharacter(const Standard_Character aValue)
 
 Storage_BaseDriver& FSD_File::PutExtCharacter(const Standard_ExtCharacter aValue)
 {
-  myStream << aValue << " ";
+  myStream << (short )aValue << " ";
   if (myStream.bad()) Storage_StreamWriteError::Raise();
   return *this;
 }
@@ -535,8 +535,9 @@ Storage_BaseDriver& FSD_File::GetCharacter(Standard_Character& aValue)
 
 Storage_BaseDriver& FSD_File::GetExtCharacter(Standard_ExtCharacter& aValue)
 {
-  if (!(myStream >> aValue)) Storage_StreamTypeMismatchError::Raise();
-  
+  short aChar = 0;
+  if (!(myStream >> aChar)) Storage_StreamTypeMismatchError::Raise();
+  aValue = aChar;
   return *this;
 }