Corrected a problem with "lef read" that prevents it from working

with non-standard extensions such as ".tlef".
This commit is contained in:
Tim Edwards 2020-07-19 21:56:00 -04:00
parent f7b5f38461
commit 9c4fb65a58
1 changed files with 5 additions and 0 deletions

View File

@ -186,6 +186,11 @@ lefFileOpen(def, file, suffix, mode, prealfile)
{
if (strcmp(endp, suffix))
{
/* Try once as-is, with the given extension. That takes care */
/* of some less-usual extensions like ".tlef". */
if ((rfile = PaOpen(name, mode, NULL, Path, CellLibPath, prealfile)) != NULL)
return rfile;
len = endp - name;
if (len > sizeof namebuf - 1) len = sizeof namebuf - 1;
(void) strncpy(namebuf, name, len);