diff --git a/mainApk.pas b/mainApk.pas index 8947852..2ff66e1 100644 --- a/mainApk.pas +++ b/mainApk.pas @@ -3424,11 +3424,16 @@ begin IfThen(LDiag <> '', LDiag, IfThen(LText = '', 'nothing found', 'read ' + IntToStr(Length(LText)) + ' chars'))])); if (not FScanning) or (LText = '') then Exit; - if StartsText('pmserver://sync?', LText) then + // CHERCHE, NE COMPARE PAS LE DEBUT : le texte decode est arrive + // avec un caractere invisible en tete (104 lus pour 103 emis), + // et le lien etait ignore alors qu'il etait lu. + if Pos('pmserver://sync?', LText) > 0 then begin StopScan; - ApplySyncLink(LText); - end; + ApplySyncLink(Trim(Copy(LText, Pos('pmserver://sync?', LText), MaxInt))); + end + else + Log('QR scan: not a sync link, first char code ' + IntToStr(Ord(LText[1]))); end); end).Start; end);