1. Sep 29, 2022
  2. Sep 28, 2022
    • Marc Durdin's avatar
      fix(developer): generate valid js when using unquoted digits in stores · 73e0a2e4
      Marc Durdin authored
      Fixes #7005.
      
      If a developer used single digit values in stores, unquoted (which is
      not really the usual approach, but should work just fine for non-zero
      values), the KMW compiler would emit invalid single-digit hexadecimal
      escapes for them, e.g. `"\x1"` instead of `"\x01"`.
      
      Sample code:
      
      ```
      store(option) 1
      
      if(option = 1) + 'a' > 'one'
      if(option = 2) + 'a' > 'two'
      + '1' > set(option = 1)
      + '2' > set(option = 2)
      ```
      
      It is not immediately obvious from this code, but the value `1` is
      actually a character with value `'\x01'` or `U+0001`!
      
      The more usual approach will not encounter this problem:
      
      ```
      store(option) '1'
      
      if(option = '1') + 'a' > 'one'
      if(option = '2') + 'a' > 'two'
      + '1' > set(option = '1')
      + '2' > set(option = '2')
      ```
      
      Note that the following is a compile error (due to internal use of
      null terminated strings).
      
      ```
      store(option) 0
      ```
      73e0a2e4
    • Marc Durdin's avatar
      fix(developer): ensure backslash in paths passed to kmcomp · f5b8effa
      Marc Durdin authored
      Fixes #7090.
      Fixes #7091.
      
      While kmcomp loads most files just fine when paths with forward slashes
      are passed in, it fails to parse target path correctly when building one
      file out of a project.
      
      For example, if the user runs:
      
      ```
      kmcomp.exe -t khmer_angkor.kmn release/k/khmer_angkor/khmer_angkor.kpj
      ```
      
      Then the following error arises:
      
      ```
      khmer_angkor.kps: Error: 0001 Validation error: The system cannot find the path specified.
      khmer_angkor.kps: Failure: Package C:\Projects\keyman\keyboards\source\khmer_angkor.kps had validation errors.
      ```
      
      This patch ensures all paths passed in as command-line parameters are
      converted to backslashes, matching the expected Windows format. While I
      only needed to fix the `FParamTarget` parameter in order to address the
      reported issues, for consistency I applied the same fix to all input
      paths.
      f5b8effa
  3. Sep 27, 2022
  4. Sep 26, 2022
  5. Sep 23, 2022
  6. Sep 22, 2022
  7. Sep 21, 2022
  8. Sep 20, 2022