summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
inline | side by side (from parent 1:
8c9e323)
Before the fix, PDs with common prefix would incorrectly be found as
a match. Example: Both "spi" and "spiflash" would be considered valid
candidates when looking for PDs which emit "spi" OUTPUT_PYTHON output.
if (!d->outputs)
continue;
if (!d->outputs)
continue;
+ const int maxlen = 1024;
+
// TODO For now we ignore that d->outputs is actually a list
// TODO For now we ignore that d->outputs is actually a list
- if (strncmp((char*)(d->outputs->data), output, strlen(output)) == 0)
+ if (strncmp((char*)(d->outputs->data), output, maxlen) == 0)
- if (strncmp(inputs.at(0), "logic", 5) == 0) {
+ if (strcmp(inputs.at(0), "logic") == 0) {
new_decoders_selected(decoders);
return;
}
// Check if we can automatically fulfill the stacking requirements
new_decoders_selected(decoders);
return;
}
// Check if we can automatically fulfill the stacking requirements
- while (strncmp(inputs.at(0), "logic", 5) != 0) {
+ while (strcmp(inputs.at(0), "logic") != 0) {
vector<const srd_decoder*> prov_decoders = get_decoders_providing(inputs.at(0));
if (prov_decoders.size() == 0) {
vector<const srd_decoder*> prov_decoders = get_decoders_providing(inputs.at(0));
if (prov_decoders.size() == 0) {