Complete the change for VMS.
diff --git a/crypto/x509/by_dir.c b/crypto/x509/by_dir.c
index 11e9c1e..098e868 100644
--- a/crypto/x509/by_dir.c
+++ b/crypto/x509/by_dir.c
@@ -357,7 +357,7 @@
 			{
 			char c = '/';
 #ifdef OPENSSL_SYS_VMS
-			c = ent->dir[strlen(ctx->dirs[i])-1];
+			c = ent->dir[strlen(ent->dir)-1];
 			if (c != ':' && c != '>' && c != ']')
 				{
 				/* If no separator is present, we assume the