Skip to content
Extraits de code Groupes Projets
Valider 0e3b383c rédigé par Thomas Goyne's avatar Thomas Goyne
Parcourir les fichiers

Handle partial characters at the end of the read buffer when loading Lua scripts. Closes #1576.

parent 73cc2d21
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -50,6 +50,8 @@ namespace Automation4 { ...@@ -50,6 +50,8 @@ namespace Automation4 {
size_t out_bytes = sizeof(buf); size_t out_bytes = sizeof(buf);
conv->Convert(&in, &in_bytes, &out, &out_bytes); conv->Convert(&in, &in_bytes, &out, &out_bytes);
if (in_bytes > 0 && in != in_buf)
file.seekg(-(std::streamoff)in_bytes, std::ios_base::cur);
*bytes_read = out - buf; *bytes_read = out - buf;
// Skip the bom // Skip the bom
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter