fix(apk): le lien du QR est accepte meme precede d'un caractere invisible

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
r-zakarya
2026-09-17 18:53:14 +01:00
parent 23967ddfca
commit fb5d2f35a2
+8 -3
View File
@@ -3424,11 +3424,16 @@ begin
IfThen(LDiag <> '', LDiag, IfThen(LDiag <> '', LDiag,
IfThen(LText = '', 'nothing found', 'read ' + IntToStr(Length(LText)) + ' chars'))])); IfThen(LText = '', 'nothing found', 'read ' + IntToStr(Length(LText)) + ' chars'))]));
if (not FScanning) or (LText = '') then Exit; 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 begin
StopScan; StopScan;
ApplySyncLink(LText); ApplySyncLink(Trim(Copy(LText, Pos('pmserver://sync?', LText), MaxInt)));
end; end
else
Log('QR scan: not a sync link, first char code ' + IntToStr(Ord(LText[1])));
end); end);
end).Start; end).Start;
end); end);