Skip to content

Commit 9e64f34

Browse files
committed
Improve CPU detection: x86
1 parent 10ab810 commit 9e64f34

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

src/main/ua-parser.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,7 @@
499499
], [[ARCHITECTURE, 'amd64']], [
500500

501501
/(ia32(?=;))/i, // IA32 (quicktime)
502-
/\b((i[346]|x)86)\b/i // IA32 (x86)
502+
/\b((i[346]|x)86)(pc)?\b/i // IA32 (x86)
503503
], [[ARCHITECTURE, 'ia32']], [
504504

505505
/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i // ARM64

test/data/ua/cpu/cpu-all.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,5 +278,13 @@
278278
{
279279
"architecture" : "68k"
280280
}
281+
},
282+
{
283+
"desc" : "x86",
284+
"ua" : "Mozilla/5.0 (Photon; U; QNX x86pc; en-US; rv:1.8.1.20) Gecko/20090127 BonEcho/2.0.0.20",
285+
"expect" :
286+
{
287+
"architecture" : "ia32"
288+
}
281289
}
282290
]

0 commit comments

Comments
 (0)