Commits

John Eriksson committed 8d6cc1a

11.0.1:

* Fixes a bug in DNS resolving where the IO function gave negative numbers
* Restricts label names, so that they can't start with underscore. This is to avoid ambiguity
with the NOP statement _

Comments (0)

Files changed (3)

se/psilon/migomipo/migol2/cli/MigolCLI.java

 
 public class MigolCLI {
 
-    private static final String VERSION = "11.1.0";
+    private static final String VERSION = "11.1.1";
     private static final String VERSIONINFO =
             "MigoMipo Migol 11 interpreter version " + VERSION + "\n"
             + "\u00A9 2009-2011 John Eriksson\n"

se/psilon/migomipo/migol2/io/SocketManager.java

                 byte[] addrbytes = addr.getAddress();
                 int savepos = mem[structPos + 3];
                 for(int i=0;i<addrbytes.length;i++){
-                    mem[savepos + i] = addrbytes[i];
+                    mem[savepos + i] = addrbytes[i] & 0xFF;
                 }
                 if(addrbytes.length == 4){
                     mode = 0;

se/psilon/migomipo/migol2/parse/MigolParser.java

     
     
     private boolean isValidName(char c){
-        return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c == '_');
+        return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z');
     }
 
     private String parseName() throws MigolParsingException {
         int start = strpos;
-        while (isValidName(c)) {
+        if(isValidName(c)){
             nextChar();
-            if (endOfLine) {
-                break;
+            while (!endOfLine && (isValidName(c) || c == '_')) {
+                nextChar();
             }
-        }
-        if (strpos <= start) {
+        } else {
             throw new MigolParsingException(
                     "Incorrect name", cLine, linenum, strpos);
         }
         return cLine.substring(start, strpos);
-
-
     }
 
     private boolean isBlank(char c) {