mirror of
https://github.com/ksherlock/merlin-utils.git
synced 2024-09-11 07:54:30 +00:00
push string - only push a max of 255 chars.
This commit is contained in:
parent
12bae449ba
commit
b55305d11c
4
omf.cpp
4
omf.cpp
@ -86,7 +86,7 @@ void push(std::vector<uint8_t> &v, uint32_t x) {
|
||||
void push(std::vector<uint8_t> &v, const std::string &s) {
|
||||
uint8_t count = std::min((int)s.size(), 255);
|
||||
push(v, count);
|
||||
v.insert(v.end(), s.begin(), s.end());
|
||||
v.insert(v.end(), s.begin(), s.begin() + count);
|
||||
}
|
||||
|
||||
class super_helper {
|
||||
@ -501,4 +501,4 @@ void save_omf(const std::string &path, std::vector<omf::segment> &segments, bool
|
||||
}
|
||||
|
||||
close(fd);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user