//
// Link.cc
//
-// Copyright 1996-2002 Glyph & Cog, LLC
+// Copyright 1996-2003 Glyph & Cog, LLC
//
//========================================================================
// get page
if (a->getLength() < 2) {
- error(-1, "Annotation destination array has wrong length");
+ error(-1, "Annotation destination array is too short");
return;
}
a->getNF(0, &obj1);
// Fit link
} else if (obj1.isName("Fit")) {
- if (a->getLength() != 2) {
- error(-1, "Annotation destination array has wrong length");
+ if (a->getLength() < 2) {
+ error(-1, "Annotation destination array is too short");
goto err2;
}
kind = destFit;
// FitH link
} else if (obj1.isName("FitH")) {
- if (a->getLength() != 3) {
- error(-1, "Annotation destination array has wrong length");
+ if (a->getLength() < 3) {
+ error(-1, "Annotation destination array is too short");
goto err2;
}
kind = destFitH;
// FitV link
} else if (obj1.isName("FitV")) {
- if (a->getLength() != 3) {
- error(-1, "Annotation destination array has wrong length");
+ if (a->getLength() < 3) {
+ error(-1, "Annotation destination array is too short");
goto err2;
}
kind = destFitV;
// FitR link
} else if (obj1.isName("FitR")) {
- if (a->getLength() != 6) {
- error(-1, "Annotation destination array has wrong length");
+ if (a->getLength() < 6) {
+ error(-1, "Annotation destination array is too short");
goto err2;
}
kind = destFitR;
// FitB link
} else if (obj1.isName("FitB")) {
- if (a->getLength() != 2) {
- error(-1, "Annotation destination array has wrong length");
+ if (a->getLength() < 2) {
+ error(-1, "Annotation destination array is too short");
goto err2;
}
kind = destFitB;
// FitBH link
} else if (obj1.isName("FitBH")) {
- if (a->getLength() != 3) {
- error(-1, "Annotation destination array has wrong length");
+ if (a->getLength() < 3) {
+ error(-1, "Annotation destination array is too short");
goto err2;
}
kind = destFitBH;
// FitBV link
} else if (obj1.isName("FitBV")) {
- if (a->getLength() != 3) {
- error(-1, "Annotation destination array has wrong length");
+ if (a->getLength() < 3) {
+ error(-1, "Annotation destination array is too short");
goto err2;
}
kind = destFitBV;