Pārlūkot izejas kodu

Revert semantic change in previous revision.

Gustavo Niemeyer 12 gadi atpakaļ
vecāks
revīzija
2628b30e54
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. 1 1
      emitterc.go

+ 1 - 1
emitterc.go

@@ -1012,7 +1012,7 @@ func yaml_emitter_analyze_scalar(emitter *yaml_emitter_t, value []byte) bool {
 		return true
 		return true
 	}
 	}
 
 
-	if len(value) == 3 && ((value[0] == '-' && value[1] == '-' && value[2] == '-') || (value[0] == '.' && value[1] == '.' && value[2] == '.')) {
+	if len(value) >= 3 && ((value[0] == '-' && value[1] == '-' && value[2] == '-') || (value[0] == '.' && value[1] == '.' && value[2] == '.')) {
 		block_indicators = true
 		block_indicators = true
 		flow_indicators = true
 		flow_indicators = true
 	}
 	}