Merge pull request #723 from niukuo/master
fix wrong length in remote schema
This commit is contained in:
commit
cdb3454283
@ -1473,7 +1473,7 @@ private:
|
||||
|
||||
if (i > 0) { // Remote reference, resolve immediately
|
||||
if (remoteProvider_) {
|
||||
if (const GenericSchemaDocument* remoteDocument = remoteProvider_->GetRemoteDocument(s, i - 1)) {
|
||||
if (const GenericSchemaDocument* remoteDocument = remoteProvider_->GetRemoteDocument(s, i)) {
|
||||
PointerType pointer(&s[i], len - i, allocator_);
|
||||
if (pointer.IsValid()) {
|
||||
if (const SchemaType* sc = remoteDocument->GetSchema(pointer)) {
|
||||
|
@ -1101,7 +1101,7 @@ public:
|
||||
};
|
||||
|
||||
for (size_t i = 0; i < kCount; i++)
|
||||
if (strncmp(uri, uris[i], length) == 0)
|
||||
if (strncmp(uri, uris[i], length) == 0 && strlen(uris[i]) == length)
|
||||
return sd_[i];
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user