mirror of
https://git.tesses.org/tesses50/tessesframework.git
synced 2026-11-29 01:01:54 +00:00
Fix httpstream so it doesn't error on youtube responses, and fix FromDoubleLE to not use big endian, but rather use little endian
This commit is contained in:
@@ -119,11 +119,7 @@ size_t HttpStream::Read(uint8_t *buff, size_t len) {
|
||||
std::string line = reader.ReadLine();
|
||||
if (line.empty()) {
|
||||
|
||||
if (this->position > 0) {
|
||||
throw std::runtime_error(
|
||||
"Incomplete Read (chunked): connection closed "
|
||||
"before final 0 chunk");
|
||||
}
|
||||
|
||||
this->done = true;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -150,7 +150,7 @@ void BitConverter::FromUint16BE(uint8_t &b, uint16_t v) {
|
||||
}
|
||||
|
||||
void BitConverter::FromDoubleLE(uint8_t &b, double v) {
|
||||
FromUint64BE(b, ToUintBits(v));
|
||||
FromUint64LE(b, ToUintBits(v));
|
||||
}
|
||||
void BitConverter::FromFloatLE(uint8_t &b, float v) {
|
||||
FromUint32LE(b, ToUint32Bits(v));
|
||||
@@ -341,4 +341,4 @@ bool BitConverter::TryParseDouble(const std::string &str, double &val) {
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace Tesses::Framework::Serialization
|
||||
} // namespace Tesses::Framework::Serialization
|
||||
|
||||
Reference in New Issue
Block a user