Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/rtapi/uspace_rtapi_main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ static void push_uint16(std::vector<char> &buf, uint16_t value) {

static uint16_t get_uint16(const std::vector<char> &buf, size_t idx) {
//at() will check index and throw std::out_of_range
return ((uint16_t)buf.at(idx) << 0) | ((uint16_t)buf.at(idx + 1) << 8);
return ((uint16_t)(unsigned char)buf.at(idx)) | ((uint16_t)(unsigned char)buf.at(idx + 1) << 8);
}

static bool recv_args(int fd, std::vector<std::string> &args) {
Expand Down
Loading