Skip to content

Commit

Permalink
Added file name check to AnyFile::init which got accidentially deleted (
Browse files Browse the repository at this point in the history
  • Loading branch information
dirkwhoffmann committed Jan 10, 2025
1 parent 57b903f commit 096e091
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 21 deletions.
2 changes: 0 additions & 2 deletions Emulator/Base/Constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@

#include "BasicTypes.h"

/** VirtualC64 project namespace
*/
namespace vc64 {

/** PAL related constants
Expand Down
2 changes: 2 additions & 0 deletions Emulator/Media/AnyFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ AnyFile::init(const string &str)
void
AnyFile::init(const fs::path &path)
{
if (!isCompatiblePath(path)) throw Error(VC64ERROR_FILE_TYPE_MISMATCH, path);

std::ifstream stream(path, std::ios::binary);
if (!stream.is_open()) throw Error(VC64ERROR_FILE_NOT_FOUND, path);

Expand Down
1 change: 0 additions & 1 deletion GUI/System/Extensions/CGImage.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ public extension CGImage {

static func bitmapInfo() -> CGBitmapInfo {

// let noAlpha = CGImageAlphaInfo.noneSkipLast.rawValue
let alpha = CGImageAlphaInfo.premultipliedLast.rawValue
let bigEn32 = CGBitmapInfo.byteOrder32Big.rawValue

Expand Down
36 changes: 18 additions & 18 deletions GUI/XIB files/Inspector.xib
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="32700.99.1234" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="23504" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
<dependencies>
<deployment identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="22690"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="23504"/>
<capability name="Named colors" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
Expand Down Expand Up @@ -246,7 +246,7 @@
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
<rect key="contentRect" x="196" y="240" width="868" height="476"/>
<rect key="screenRect" x="0.0" y="0.0" width="1496" height="933"/>
<rect key="screenRect" x="0.0" y="0.0" width="1728" height="1079"/>
<value key="minSize" type="size" width="868" height="468"/>
<value key="maxSize" type="size" width="868" height="4096"/>
<view key="contentView" wantsLayer="YES" id="EiT-Mj-1SZ">
Expand Down Expand Up @@ -629,7 +629,7 @@
</textFieldCell>
<tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/>
</tableColumn>
<tableColumn identifier="instr" editable="NO" width="69" minWidth="64" maxWidth="1000" id="xHZ-k6-Cbx">
<tableColumn identifier="instr" editable="NO" width="64" minWidth="64" maxWidth="1000" id="xHZ-k6-Cbx">
<tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border" alignment="left" title="Instruction">
<color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="headerColor" catalog="System" colorSpace="catalog"/>
Expand All @@ -649,7 +649,7 @@
</subviews>
</clipView>
<scroller key="horizontalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="YES" id="MZL-mS-DJS">
<rect key="frame" x="1" y="280" width="243" height="15"/>
<rect key="frame" x="1" y="279" width="243" height="16"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
<scroller key="verticalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="NO" id="JYa-bJ-gYP">
Expand Down Expand Up @@ -730,7 +730,7 @@
<nil key="backgroundColor"/>
</clipView>
<scroller key="horizontalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="YES" id="HFK-eC-8zz">
<rect key="frame" x="1" y="270" width="210" height="15"/>
<rect key="frame" x="1" y="269" width="210" height="16"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
<scroller key="verticalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="NO" id="Mkp-Jz-GdN">
Expand Down Expand Up @@ -801,7 +801,7 @@
</textFieldCell>
<tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/>
</tableColumn>
<tableColumn identifier="delete" width="25" minWidth="24" maxWidth="1000" id="ao3-Di-49W">
<tableColumn identifier="delete" width="24" minWidth="24" maxWidth="1000" id="ao3-Di-49W">
<tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border" alignment="left">
<color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
Expand All @@ -822,7 +822,7 @@
<nil key="backgroundColor"/>
</clipView>
<scroller key="horizontalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="YES" id="kEa-CE-ujH">
<rect key="frame" x="1" y="76" width="119" height="15"/>
<rect key="frame" x="1" y="75" width="119" height="16"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
<scroller key="verticalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="NO" id="TfN-eP-Ded">
Expand Down Expand Up @@ -882,7 +882,7 @@
</textFieldCell>
<tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/>
</tableColumn>
<tableColumn identifier="delete" width="25" minWidth="24" maxWidth="1000" id="sLf-F8-i7D">
<tableColumn identifier="delete" width="24" minWidth="24" maxWidth="1000" id="sLf-F8-i7D">
<tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border" alignment="left">
<color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
Expand All @@ -903,7 +903,7 @@
<nil key="backgroundColor"/>
</clipView>
<scroller key="horizontalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="YES" id="6DF-xO-b41">
<rect key="frame" x="1" y="76" width="119" height="15"/>
<rect key="frame" x="1" y="75" width="119" height="16"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
<scroller key="verticalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="NO" id="hxM-eR-XLc">
Expand Down Expand Up @@ -2135,7 +2135,7 @@
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES"/>
<popUpButtonCell key="cell" type="push" title="Visible Banks (CPU)" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" selectedItem="AXp-S4-jbp" id="lQU-85-fyW">
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="menu"/>
<font key="font" metaFont="message"/>
<menu key="menu" id="8yH-ul-5K6">
<items>
<menuItem title="Visible Banks (CPU)" state="on" id="AXp-S4-jbp"/>
Expand Down Expand Up @@ -2186,7 +2186,7 @@
</textFieldCell>
<tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/>
</tableColumn>
<tableColumn identifier="source" editable="NO" width="65" minWidth="64" maxWidth="1000" id="cQo-K4-DWa">
<tableColumn identifier="source" editable="NO" width="64" minWidth="64" maxWidth="1000" id="cQo-K4-DWa">
<tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border" alignment="center" title="Source">
<color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" white="0.33333299" alpha="1" colorSpace="calibratedWhite"/>
Expand All @@ -2207,7 +2207,7 @@
<nil key="backgroundColor"/>
</clipView>
<scroller key="horizontalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="YES" id="MEi-U3-Ptz">
<rect key="frame" x="1" y="163" width="118" height="15"/>
<rect key="frame" x="1" y="162" width="118" height="16"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
<scroller key="verticalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="NO" id="91b-gx-4gg">
Expand Down Expand Up @@ -2278,7 +2278,7 @@
<nil key="backgroundColor"/>
</clipView>
<scroller key="horizontalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="YES" id="J5z-hy-zmV">
<rect key="frame" x="1" y="163" width="638" height="15"/>
<rect key="frame" x="1" y="162" width="638" height="16"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
<scroller key="verticalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="NO" id="Mv8-Mj-2md">
Expand Down Expand Up @@ -3273,7 +3273,7 @@
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<popUpButtonCell key="cell" type="push" title="None" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" selectedItem="ffP-Oo-C9n" id="2UE-Qv-Pw5">
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="menu"/>
<font key="font" metaFont="message"/>
<menu key="menu" id="IAk-gL-61l">
<items>
<menuItem title="None" state="on" id="ffP-Oo-C9n"/>
Expand Down Expand Up @@ -3622,7 +3622,7 @@
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<popUpButtonCell key="cell" type="push" title="None" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" selectedItem="mXA-8A-bTc" id="xBL-kJ-Hyx">
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="menu"/>
<font key="font" metaFont="message"/>
<menu key="menu" id="icj-US-VSR">
<items>
<menuItem title="None" state="on" id="mXA-8A-bTc"/>
Expand Down Expand Up @@ -3801,7 +3801,7 @@
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<popUpButtonCell key="cell" type="push" title="None" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" selectedItem="hlm-2v-nxd" id="1YV-Ve-ulY">
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="menu"/>
<font key="font" metaFont="message"/>
<menu key="menu" id="dhI-xc-pfw">
<items>
<menuItem title="None" state="on" id="hlm-2v-nxd"/>
Expand Down Expand Up @@ -3998,7 +3998,7 @@
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<popUpButtonCell key="cell" type="push" title="None" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" selectedItem="Jhz-J8-ewW" id="kHx-Nq-paY">
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="menu"/>
<font key="font" metaFont="message"/>
<menu key="menu" id="Smo-c6-HFs">
<items>
<menuItem title="None" state="on" id="Jhz-J8-ewW"/>
Expand Down

0 comments on commit 096e091

Please sign in to comment.